· 8 years ago · Sep 01, 2018, 03:02 AM
1--
2-- Structure for table `ps_category`
3--
4
5DROP TABLE IF EXISTS `ps_category`;
6CREATE TABLE IF NOT EXISTS `ps_category` (
7 `id_category` int(10) unsigned NOT NULL AUTO_INCREMENT,
8 `id_parent` int(10) unsigned NOT NULL,
9 `level_depth` tinyint(3) unsigned NOT NULL DEFAULT '0',
10 `nleft` int(10) unsigned NOT NULL DEFAULT '0',
11 `nright` int(10) unsigned NOT NULL DEFAULT '0',
12 `active` tinyint(1) unsigned NOT NULL DEFAULT '0',
13 `date_add` datetime NOT NULL,
14 `date_upd` datetime NOT NULL,
15 `position` int(10) unsigned NOT NULL DEFAULT '0',
16 `is_root_category` tinyint(1) NOT NULL DEFAULT '0',
17 PRIMARY KEY (`id_category`),
18 KEY `category_parent` (`id_parent`),
19 KEY `nleftright` (`nleft`,`nright`)
20) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
21
22--
23-- Structure for table `ps_category_lang`
24--
25
26DROP TABLE IF EXISTS `ps_category_lang`;
27CREATE TABLE IF NOT EXISTS `ps_category_lang` (
28 `id_category` int(10) unsigned NOT NULL,
29 `id_shop` int(11) unsigned NOT NULL DEFAULT '1',
30 `id_lang` int(10) unsigned NOT NULL,
31 `name` varchar(128) NOT NULL,
32 `description` text,
33 `link_rewrite` varchar(128) NOT NULL,
34 `meta_title` varchar(128) DEFAULT NULL,
35 `meta_keywords` varchar(255) DEFAULT NULL,
36 `meta_description` varchar(255) DEFAULT NULL,
37 UNIQUE KEY `category_lang_index` (`id_category`,`id_shop`,`id_lang`),
38 KEY `category_name` (`name`)
39) ENGINE=InnoDB DEFAULT CHARSET=utf8;
40
41--
42-- Structure for table `ps_product`
43--
44
45DROP TABLE IF EXISTS `ps_product`;
46CREATE TABLE IF NOT EXISTS `ps_product` (
47 `id_product` int(10) unsigned NOT NULL AUTO_INCREMENT,
48 `id_supplier` int(10) unsigned DEFAULT NULL,
49 `id_manufacturer` int(10) unsigned DEFAULT NULL,
50 `id_category_default` int(10) unsigned DEFAULT NULL,
51 `id_tax_rules_group` int(11) unsigned NOT NULL,
52 `on_sale` tinyint(1) unsigned NOT NULL DEFAULT '0',
53 `online_only` tinyint(1) unsigned NOT NULL DEFAULT '0',
54 `ean13` varchar(13) DEFAULT NULL,
55 `upc` varchar(12) DEFAULT NULL,
56 `ecotax` decimal(17,6) NOT NULL DEFAULT '0.000000',
57 `quantity` int(10) NOT NULL DEFAULT '0',
58 `minimal_quantity` int(10) unsigned NOT NULL DEFAULT '1',
59 `price` decimal(20,6) NOT NULL DEFAULT '0.000000',
60 `wholesale_price` decimal(20,6) NOT NULL DEFAULT '0.000000',
61 `unity` varchar(255) DEFAULT NULL,
62 `unit_price_ratio` decimal(20,6) NOT NULL DEFAULT '0.000000',
63 `additional_shipping_cost` decimal(20,2) NOT NULL DEFAULT '0.00',
64 `reference` varchar(32) DEFAULT NULL,
65 `supplier_reference` varchar(32) DEFAULT NULL,
66 `location` varchar(64) DEFAULT NULL,
67 `width` float NOT NULL DEFAULT '0',
68 `height` float NOT NULL DEFAULT '0',
69 `depth` float NOT NULL DEFAULT '0',
70 `weight` float NOT NULL DEFAULT '0',
71 `out_of_stock` int(10) unsigned NOT NULL DEFAULT '2',
72 `quantity_discount` tinyint(1) DEFAULT '0',
73 `customizable` tinyint(2) NOT NULL DEFAULT '0',
74 `uploadable_files` tinyint(4) NOT NULL DEFAULT '0',
75 `text_fields` tinyint(4) NOT NULL DEFAULT '0',
76 `active` tinyint(1) unsigned NOT NULL DEFAULT '0',
77 `available_for_order` tinyint(1) NOT NULL DEFAULT '1',
78 `available_date` date NOT NULL,
79 `condition` enum('new','used','refurbished') NOT NULL DEFAULT 'new',
80 `show_price` tinyint(1) NOT NULL DEFAULT '1',
81 `indexed` tinyint(1) NOT NULL DEFAULT '0',
82 `visibility` enum('both','catalog','search','none') NOT NULL DEFAULT 'both',
83 `cache_is_pack` tinyint(1) NOT NULL DEFAULT '0',
84 `cache_has_attachments` tinyint(1) NOT NULL DEFAULT '0',
85 `is_virtual` tinyint(1) NOT NULL DEFAULT '0',
86 `cache_default_attribute` int(10) unsigned DEFAULT NULL,
87 `date_add` datetime NOT NULL,
88 `date_upd` datetime NOT NULL,
89 `advanced_stock_management` tinyint(1) NOT NULL DEFAULT '0',
90 PRIMARY KEY (`id_product`),
91 KEY `product_supplier` (`id_supplier`),
92 KEY `product_manufacturer` (`id_manufacturer`),
93 KEY `id_category_default` (`id_category_default`),
94 KEY `date_add` (`date_add`)
95) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
96
97--
98-- Structure for table `ps_product_lang`
99--
100
101DROP TABLE IF EXISTS `ps_product_lang`;
102CREATE TABLE IF NOT EXISTS `ps_product_lang` (
103 `id_product` int(10) unsigned NOT NULL,
104 `id_shop` int(11) unsigned NOT NULL DEFAULT '1',
105 `id_lang` int(10) unsigned NOT NULL,
106 `description` text,
107 `description_short` text,
108 `link_rewrite` varchar(128) NOT NULL,
109 `meta_description` varchar(255) DEFAULT NULL,
110 `meta_keywords` varchar(255) DEFAULT NULL,
111 `meta_title` varchar(128) DEFAULT NULL,
112 `name` varchar(128) NOT NULL,
113 `available_now` varchar(255) DEFAULT NULL,
114 `available_later` varchar(255) DEFAULT NULL,
115 UNIQUE KEY `product_lang_index` (`id_product`,`id_shop`,`id_lang`),
116 KEY `id_lang` (`id_lang`),
117 KEY `name` (`name`)
118) ENGINE=InnoDB DEFAULT CHARSET=utf8;