// Merging multishipping branche on 1.5
This commit is contained in:
+21
-3
@@ -139,6 +139,11 @@ CREATE TABLE `PREFIX_carrier` (
|
||||
`external_module_name` varchar(64) DEFAULT NULL,
|
||||
`shipping_method` int(2) NOT NULL DEFAULT '0',
|
||||
`position` int(10) unsigned NOT NULL default '0',
|
||||
`max_width` int(10) DEFAULT 0,
|
||||
`max_height` int(10) DEFAULT 0,
|
||||
`max_deep` int(10) DEFAULT 0,
|
||||
`max_weight` int(10) DEFAULT 0,
|
||||
`grade` int(10) DEFAULT 0,
|
||||
PRIMARY KEY (`id_carrier`),
|
||||
KEY `deleted` (`deleted`,`active`),
|
||||
KEY `id_tax_rules_group` (`id_tax_rules_group`)
|
||||
@@ -148,8 +153,8 @@ CREATE TABLE `PREFIX_carrier_lang` (
|
||||
`id_carrier` int(10) unsigned NOT NULL,
|
||||
`id_shop` int(11) unsigned NOT NULL DEFAULT '1',
|
||||
`id_lang` int(10) unsigned NOT NULL,
|
||||
`delay` varchar(128) default NULL,
|
||||
UNIQUE KEY `shipper_lang_index` (`id_lang`,`id_shop`, `id_carrier`)
|
||||
`delay` varchar(128) DEFAULT NULL,
|
||||
PRIMARY KEY `shipper_lang_index` (`id_lang`,`id_shop`, `id_carrier`)
|
||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `PREFIX_carrier_zone` (
|
||||
@@ -163,6 +168,7 @@ CREATE TABLE `PREFIX_cart` (
|
||||
`id_group_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1',
|
||||
`id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1',
|
||||
`id_carrier` int(10) unsigned NOT NULL,
|
||||
`delivery_option` varchar(100),
|
||||
`id_lang` int(10) unsigned NOT NULL,
|
||||
`id_address_delivery` int(10) unsigned NOT NULL,
|
||||
`id_address_invoice` int(10) unsigned NOT NULL,
|
||||
@@ -173,6 +179,7 @@ CREATE TABLE `PREFIX_cart` (
|
||||
`recyclable` tinyint(1) unsigned NOT NULL default '1',
|
||||
`gift` tinyint(1) unsigned NOT NULL default '0',
|
||||
`gift_message` text,
|
||||
`allow_seperated_package` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
|
||||
`date_add` datetime NOT NULL,
|
||||
`date_upd` datetime NOT NULL,
|
||||
PRIMARY KEY (`id_cart`),
|
||||
@@ -274,6 +281,7 @@ CREATE TABLE `PREFIX_cart_cart_rule` (
|
||||
CREATE TABLE `PREFIX_cart_product` (
|
||||
`id_cart` int(10) unsigned NOT NULL,
|
||||
`id_product` int(10) unsigned NOT NULL,
|
||||
`id_address_delivery` int(10) UNSIGNED DEFAULT 0,
|
||||
`id_shop` int(10) unsigned NOT NULL DEFAULT '1',
|
||||
`id_product_attribute` int(10) unsigned default NULL,
|
||||
`quantity` int(10) unsigned NOT NULL default '0',
|
||||
@@ -583,13 +591,14 @@ CREATE TABLE `PREFIX_customer_thread` (
|
||||
CREATE TABLE `PREFIX_customization` (
|
||||
`id_customization` int(10) unsigned NOT NULL auto_increment,
|
||||
`id_product_attribute` int(10) unsigned NOT NULL default '0',
|
||||
`id_address_delivery` int(10) UNSIGNED NOT NULL DEFAULT 0,
|
||||
`id_cart` int(10) unsigned NOT NULL,
|
||||
`id_product` int(10) NOT NULL,
|
||||
`quantity` int(10) NOT NULL,
|
||||
`quantity_refunded` INT NOT NULL DEFAULT '0',
|
||||
`quantity_returned` INT NOT NULL DEFAULT '0',
|
||||
`in_cart` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id_customization`,`id_cart`,`id_product`),
|
||||
PRIMARY KEY (`id_customization`,`id_cart`,`id_product`, `id_address_delivery`),
|
||||
KEY `id_product_attribute` (`id_product_attribute`)
|
||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
|
||||
|
||||
@@ -753,6 +762,13 @@ CREATE TABLE `PREFIX_product_group_reduction_cache` (
|
||||
PRIMARY KEY(`id_product`, `id_group`)
|
||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `PREFIX_product_carrier` (
|
||||
`id_product` int(10) unsigned NOT NULL,
|
||||
`id_carrier_reference` int(10) unsigned NOT NULL,
|
||||
`id_shop` int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (`id_product`, `id_carrier_reference`, `id_shop`)
|
||||
) ENGINE = ENGINE_TYPE DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `PREFIX_guest` (
|
||||
`id_guest` int(10) unsigned NOT NULL auto_increment,
|
||||
`id_operating_system` int(10) unsigned default NULL,
|
||||
@@ -971,9 +987,11 @@ CREATE TABLE `PREFIX_operating_system` (
|
||||
|
||||
CREATE TABLE `PREFIX_orders` (
|
||||
`id_order` int(10) unsigned NOT NULL auto_increment,
|
||||
`reference` VARCHAR(9),
|
||||
`id_group_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1',
|
||||
`id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1',
|
||||
`id_carrier` int(10) unsigned NOT NULL,
|
||||
`id_warehouse` int(10) unsigned DEFAULT 0,
|
||||
`id_lang` int(10) unsigned NOT NULL,
|
||||
`id_customer` int(10) unsigned NOT NULL,
|
||||
`id_cart` int(10) unsigned NOT NULL,
|
||||
|
||||
@@ -174,8 +174,8 @@ INSERT INTO `PREFIX_cart` (`id_cart`, `id_carrier`, `id_lang`, `id_address_deliv
|
||||
INSERT INTO `PREFIX_cart_product` (`id_cart`, `id_product`, `id_shop`, `id_product_attribute`, `quantity`, `date_add`) VALUES (1, 7, 1, 23, 1, NOW());
|
||||
INSERT INTO `PREFIX_cart_product` (`id_cart`, `id_product`, `id_shop`, `id_product_attribute`, `quantity`, `date_add`) VALUES (1, 9, 1, 0, 1, NOW());
|
||||
|
||||
INSERT INTO `PREFIX_orders` (`id_order`, `id_carrier`, `id_lang`, `id_customer`, `id_cart`, `id_currency`, `id_address_delivery`, `id_address_invoice`, `secure_key`, `payment`, `module`, `recyclable`, `gift`, `gift_message`, `shipping_number`, `total_discounts`, `total_paid`, `total_paid_real`, `total_products`, `total_products_wt`, `total_shipping`, `total_wrapping`, `invoice_number`, `delivery_number`, `invoice_date`, `delivery_date`, `date_add`, `date_upd`)
|
||||
VALUES (1, 2, 2, 1, 1, 1, 2, 2, '47ce86627c1f3c792a80773c5d2deaf8', 'Chèque', 'cheque', 0, 0, '', '', '0.00', '625.98', '625.98', '516.72', '618.00', '7.98', '0.00', 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', NOW(), NOW());
|
||||
INSERT INTO `PREFIX_orders` (`id_order`, `reference`, `id_carrier`, `id_lang`, `id_customer`, `id_cart`, `id_currency`, `id_address_delivery`, `id_address_invoice`, `secure_key`, `payment`, `module`, `recyclable`, `gift`, `gift_message`, `shipping_number`, `total_discounts`, `total_paid`, `total_paid_real`, `total_products`, `total_products_wt`, `total_shipping`, `total_wrapping`, `invoice_number`, `delivery_number`, `invoice_date`, `delivery_date`, `date_add`, `date_upd`)
|
||||
VALUES (1, 'XKBKNABJ', 2, 2, 1, 1, 1, 2, 2, '47ce86627c1f3c792a80773c5d2deaf8', 'Chèque', 'cheque', 0, 0, '', '', '0.00', '625.98', '625.98', '516.72', '618.00', '7.98', '0.00', 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', NOW(), NOW());
|
||||
INSERT INTO `PREFIX_order_detail` (`id_order_detail`, `id_order`, `product_id`, `product_attribute_id`, `product_name`, `product_quantity`, `product_quantity_return`, `product_price`, `product_quantity_discount`, `product_ean13`, `product_reference`, `product_supplier_reference`, `product_weight`, `ecotax`, `download_hash`, `download_nb`, `download_deadline`, `tax_name`)
|
||||
VALUES (1, 1, 7, 23, 'iPod touch - Capacité: 32Go', 1, 0, '392.140500', '0.000000', NULL, NULL, NULL, 0, '0.00', '', 0, '0000-00-00 00:00:00', '');
|
||||
INSERT INTO `PREFIX_order_detail` (`id_order_detail`, `id_order`, `product_id`, `product_attribute_id`, `product_name`, `product_quantity`, `product_quantity_return`, `product_price`, `product_quantity_discount`, `product_ean13`, `product_reference`, `product_supplier_reference`, `product_weight`, `ecotax`, `download_hash`, `download_nb`, `download_deadline`, `tax_name`)
|
||||
|
||||
@@ -189,7 +189,6 @@ CREATE TABLE IF NOT EXISTS `PREFIX_request_sql` (
|
||||
|
||||
/* PHP:add_new_tab(AdminRequestSql, fr:SQL Manager|es:SQL Manager|en:SQL Manager|de:Wunsh|it:SQL Manager, 9); */;
|
||||
|
||||
|
||||
ALTER TABLE `PREFIX_carrier` ADD COLUMN `id_reference` int(10) NOT NULL AFTER `id_carrier`;
|
||||
UPDATE `PREFIX_carrier` SET id_reference = id_carrier;
|
||||
|
||||
@@ -241,6 +240,31 @@ ALTER TABLE `PREFIX_order_state` ADD COLUMN `shipped` TINYINT(1) UNSIGNED NOT NU
|
||||
UPDATE `PREFIX_order_state` SET `shipped` = 1 WHERE id_order_states IN (4, 5);
|
||||
|
||||
|
||||
ALTER TABLE `PREFIX_carrier`
|
||||
ADD COLUMN `max_width` int(10) DEFAULT 0 AFTER `position`,
|
||||
ADD COLUMN `max_height` int(10) DEFAULT 0 AFTER `max_width`,
|
||||
ADD COLUMN `max_depth` int(10) DEFAULT 0 AFTER `max_height`,
|
||||
ADD COLUMN `max_weight` int(10) DEFAULT 0 AFTER `max_deep`,
|
||||
ADD COLUMN `grade` int(10) DEFAULT 0 AFTER `max_weight`;
|
||||
|
||||
ALTER TABLE `PREFIX_cart_product`
|
||||
ADD COLUMN `id_address_delivery` int(10) UNSIGNED DEFAULT 0 AFTER `date_add`;
|
||||
|
||||
UPDATE `PREFIX_cart_product` SET id_address_delivery = 0;
|
||||
|
||||
ALTER TABLE `PREFIX_cart` ADD COLUMN `allow_seperated_package` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0 AFTER `gift_message`;
|
||||
CREATE TABLE `PREFIX_product_carrier` (
|
||||
`id_product` int(10) unsigned NOT NULL,
|
||||
`id_carrier_reference` int(10) unsigned NOT NULL,
|
||||
`id_shop` int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (`id_product`, `id_carrier_reference`, `id_shop`)
|
||||
) ENGINE = ENGINE_TYPE DEFAULT CHARSET=utf8;
|
||||
|
||||
ALTER TABLE `PREFIX_customization` ADD COLUMN `id_address_delivery` int(10) UNSIGNED NOT NULL DEFAULT 0 AFTER `id_product_attribute`,
|
||||
DROP PRIMARY KEY,
|
||||
ADD PRIMARY KEY USING BTREE(`id_customization`, `id_cart`, `id_product`, `id_address_delivery`);
|
||||
|
||||
|
||||
CREATE TABLE `PREFIX_cart_rule` (
|
||||
`id_cart_rule` int(10) unsigned NOT NULL auto_increment,
|
||||
`id_customer` int unsigned NOT NULL default 0,
|
||||
@@ -490,6 +514,13 @@ ALTER TABLE `PREFIX_specific_price` ADD `id_product_attribute` INT UNSIGNED NOT
|
||||
ALTER TABLE `PREFIX_specific_price` DROP INDEX `id_product`;
|
||||
ALTER TABLE `PREFIX_specific_price` ADD INDEX `id_product` (`id_product`, `id_product_attribute`, `id_shop`, `id_currency`, `id_country`, `id_group`, `from_quantity`, `from`, `to`);
|
||||
|
||||
|
||||
ALTER TABLE `PREFIX_orders` ADD COLUMN `reference` varchar(9) AFTER `id_order`;
|
||||
ALTER TABLE `PREFIX_orders` ADD COLUMN `id_warehouse` int(10) unsigned DEFAULT 0 AFTER `id_carrier`;
|
||||
|
||||
ALTER TABLE `PREFIX_cart` ADD COLUMN `order_reference` varchar(9) AFTER `id_cart`;
|
||||
ALTER TABLE `PREFIX_cart` ADD COLUMN `delivery_option` varchar(100) AFTER `id_carrier`;
|
||||
|
||||
ALTER TABLE `PREFIX_hook` ADD `is_native` TINYINT( 1 ) NOT NULL DEFAULT '0';
|
||||
|
||||
ALTER TABLE `PREFIX_tax` ADD COLUMN `account_number` VARCHAR(64) NOT NULL;
|
||||
|
||||
Reference in New Issue
Block a user