// Carrier association + discount association
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7696 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -541,8 +541,6 @@ CREATE TABLE `PREFIX_delivery` (
|
||||
|
||||
CREATE TABLE `PREFIX_discount` (
|
||||
`id_discount` int(10) unsigned NOT NULL auto_increment,
|
||||
`id_group_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1',
|
||||
`id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1',
|
||||
`id_discount_type` int(10) unsigned NOT NULL,
|
||||
`behavior_not_exhausted` TINYINT(3) DEFAULT '1',
|
||||
`id_customer` int(10) unsigned NOT NULL,
|
||||
@@ -562,8 +560,6 @@ CREATE TABLE `PREFIX_discount` (
|
||||
`date_add` datetime NOT NULL,
|
||||
`date_upd` datetime NOT NULL,
|
||||
PRIMARY KEY (`id_discount`),
|
||||
KEY `id_group_shop` (`id_group_shop`),
|
||||
KEY `id_shop` (`id_shop`),
|
||||
KEY `discount_name` (`name`),
|
||||
KEY `discount_customer` (`id_customer`),
|
||||
KEY `id_discount_type` (`id_discount_type`)
|
||||
@@ -1897,4 +1893,11 @@ CREATE TABLE `PREFIX_scene_shop` (
|
||||
`id_shop` INT( 11 ) UNSIGNED NOT NULL,
|
||||
PRIMARY KEY (`id_scene`, `id_shop`),
|
||||
KEY `id_shop` (`id_shop`)
|
||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `PREFIX_discount_shop` (
|
||||
`id_discount` INT( 11 ) UNSIGNED NOT NULL ,
|
||||
`id_shop` INT( 11 ) UNSIGNED NOT NULL,
|
||||
PRIMARY KEY (`id_discount`, `id_shop`),
|
||||
KEY `id_shop` (`id_shop`)
|
||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
|
||||
@@ -119,9 +119,6 @@ CREATE TABLE `PREFIX_currency_shop` (
|
||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
|
||||
INSERT INTO `PREFIX_currency_shop` (id_shop, id_currency) (SELECT 1, id_currency FROM PREFIX_currency);
|
||||
|
||||
ALTER TABLE `PREFIX_discount` ADD `id_group_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1' AFTER `id_discount`, ADD `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1' AFTER `id_group_shop`;
|
||||
ALTER TABLE `PREFIX_discount` ADD INDEX `id_group_shop` (`id_group_shop`), ADD INDEX `id_shop` (`id_shop`);
|
||||
|
||||
ALTER TABLE `PREFIX_cart` ADD `id_group_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1' AFTER `id_cart` , ADD `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1' AFTER `id_group_shop`, ADD INDEX `id_group_shop` (`id_group_shop`), ADD INDEX `id_shop` (`id_shop`);
|
||||
|
||||
ALTER TABLE `PREFIX_customer` ADD `id_group_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1' AFTER `id_customer` , ADD `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1' AFTER `id_group_shop`, ADD INDEX `id_group_shop` (`id_group_shop`), ADD INDEX `id_shop` (`id_shop`);
|
||||
@@ -312,5 +309,15 @@ CREATE TABLE `PREFIX_scene_shop` (
|
||||
PRIMARY KEY (`id_scene`, `id_shop`),
|
||||
KEY `id_shop` (`id_shop`)
|
||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
|
||||
INSERT INTO `PREFIX_scene_shop` (id_shop, id_scene) (SELECT 1, id_scene FROM PREFIX_scene);
|
||||
|
||||
CREATE TABLE `PREFIX_discount_shop` (
|
||||
`id_discount` INT( 11 ) UNSIGNED NOT NULL ,
|
||||
`id_shop` INT( 11 ) UNSIGNED NOT NULL,
|
||||
PRIMARY KEY (`id_discount`, `id_shop`),
|
||||
KEY `id_shop` (`id_shop`)
|
||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
|
||||
INSERT INTO `PREFIX_discount_shop` (id_shop, id_discount) (SELECT 1, id_discount FROM PREFIX_discount);
|
||||
|
||||
|
||||
/* PHP:create_multistore(); */
|
||||
|
||||
Reference in New Issue
Block a user