[*] BO : Adding category management with multishop
This commit is contained in:
@@ -302,6 +302,7 @@ CREATE TABLE `PREFIX_category` (
|
||||
`date_add` datetime NOT NULL,
|
||||
`date_upd` datetime NOT NULL,
|
||||
`position` int(10) unsigned NOT NULL default '0',
|
||||
`is_root_category` tinyint(1) NOT NULL default '0',
|
||||
PRIMARY KEY (`id_category`),
|
||||
KEY `category_parent` (`id_parent`),
|
||||
KEY `nleftright` (`nleft`,`nright`)
|
||||
@@ -2367,3 +2368,10 @@ CREATE TABLE IF NOT EXISTS `PREFIX_risk_lang` (
|
||||
PRIMARY KEY (`id_risk`,`id_lang`),
|
||||
KEY `id_risk` (`id_risk`)
|
||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `PREFIX_category_shop` (
|
||||
`id_category` int(11) NOT NULL,
|
||||
`id_shop` int(11) NOT NULL,
|
||||
PRIMARY KEY (`id_category`, `id_shop`),
|
||||
UNIQUE KEY `id_category_shop` (`id_category`,`id_shop`)
|
||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
|
||||
@@ -1746,3 +1746,8 @@ CREATE TABLE IF NOT EXISTS `PREFIX_linksmenutop_lang` (
|
||||
`label` VARCHAR( 128 ) NOT NULL ,
|
||||
INDEX ( `id_link` , `id_lang`, `id_shop`)
|
||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO `PREFIX_category_shop` (`id_category`, `id_shop`) VALUES
|
||||
(2, 1),
|
||||
(3, 1),
|
||||
(4, 1);
|
||||
@@ -1647,3 +1647,6 @@ INSERT INTO `PREFIX_risk_lang` (`id_risk`, `id_lang`, `name`) VALUES
|
||||
(2, 5, 'Low'),
|
||||
(3, 5, 'Middle'),
|
||||
(4, 5, 'Hight');
|
||||
|
||||
INSERT INTO `PREFIX_category_shop` (`id_category`, `id_shop`) VALUES
|
||||
(1, 1);
|
||||
@@ -2,3 +2,7 @@ SET NAMES 'utf8';
|
||||
|
||||
|
||||
ALTER TABLE `PREFIX_order_state` ADD COLUMN `deleted` tinyint(1) UNSIGNED NOT NULL default '0' AFTER `paid`;
|
||||
|
||||
ALTER TABLE `PREFIX_category` ADD COLUMN `is_root_category` tinyint(1) NOT NULL default '0' AFTER `position`;
|
||||
|
||||
UPDATE `PREFIX_category` SET `is_root_category` = 1 WHERE `id_category` = 1;
|
||||
|
||||
Reference in New Issue
Block a user