Showing
1 changed file
with
463 additions
and
459 deletions
1 | ---erp_supplier库: | ||
2 | ---1、base_product: | ||
3 | -ALTER TABLE `erp_supplier`.`base_product` | ||
4 | -CHANGE COLUMN `grade` `grade` char(20) DEFAULT NULL COMMENT '重点款型(是:1,否:null)', | ||
5 | -ADD COLUMN `factory_code` varchar(100) DEFAULT '' COMMENT '厂家编号' AFTER `brand_folder`, | ||
6 | -ADD COLUMN `age_level` varchar(50) DEFAULT '' COMMENT '年龄层(1成人 2大童 3小童 逗号分隔)' AFTER `factory_code`, | ||
7 | -MODIFY COLUMN `goods_season` smallint(5) NULL DEFAULT 0 COMMENT '1:春2:夏3:秋4:冬5:春夏6:秋冬' AFTER `goods_years`, | ||
8 | -ADD COLUMN `is_vip` enum('Y','N','B') NULL DEFAULT 'B' COMMENT '是否VIP Y:是N:否B:品牌设置' AFTER `age_level`, | ||
9 | -ADD COLUMN `is_limitbuy` enum('Y','N') NULL DEFAULT 'N' COMMENT '是否限购' AFTER `is_vip`, | ||
10 | -ADD COLUMN `limit_start_time` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '限购开始时间' AFTER `is_limitbuy`, | ||
11 | -ADD COLUMN `limit_end_time` int(10) NULL DEFAULT 0 COMMENT '限购结束时间' AFTER `limit_start_time`, | ||
12 | -ADD COLUMN `expect_shelf_time` int(10) NULL DEFAULT 0 COMMENT '预计上架时间' AFTER `limit_end_time`, | ||
13 | -ADD COLUMN `is_outlets` enum('Y','N','B') NULL DEFAULT 'B' COMMENT '是否奥莱 Y:是N:否B:品牌设置' AFTER `expect_shelf_time`, | ||
14 | -ADD COLUMN `seasons` varchar(100) DEFAULT '' COMMENT '适销季 夏:summer 冬:winter 四季:seasons', | ||
15 | -ADD COLUMN `reason` varchar(255) DEFAULT '' COMMENT '审批驳回原因', | ||
16 | -ADD COLUMN `editId` int(10) COMMENT '修改人id', | ||
17 | -ADD COLUMN `audit_pass_id` int(10) COMMENT '审核通过人id', | ||
18 | -ADD COLUMN `audit_pass_time` int(10) NULL DEFAULT 0 COMMENT '审核通过时间', | ||
19 | -ADD COLUMN `audit_fail_id` int(10) COMMENT '审核不通过人id', | ||
20 | -ADD COLUMN `audit_fail_time` int(10) NULL DEFAULT 0 COMMENT '审核不通过时间', | ||
21 | -ADD COLUMN `operate_info` varchar(255) DEFAULT '' COMMENT '操作信息'; | ||
22 | - | ||
23 | - | ||
24 | ---/**建立索引***/ | ||
25 | -ALTER TABLE `erp_supplier`.`base_product` | ||
26 | -ADD INDEX `brand_id` (`brand_id`) comment '', | ||
27 | -ADD INDEX `shop_id` (`shop_id`) comment '', | ||
28 | -ADD INDEX `supplier_id` (`supplier_id`) comment '', | ||
29 | -ADD INDEX `is_auditing` (`is_auditing`) comment '', | ||
30 | -ADD INDEX `attribute` (`attribute`) comment '', | ||
31 | -ADD INDEX `is_jit` (`is_jit`) comment '', | ||
32 | -ADD INDEX `is_advance` (`is_advance`) comment '', | ||
33 | -ADD INDEX `is_outlets` (`is_outlets`) comment ''; | ||
34 | - | ||
35 | ---2、base_goods: | ||
36 | -ALTER TABLE `erp_supplier`.`base_goods` | ||
37 | -ADD COLUMN `factory_goods_name` varchar(50) COMMENT '厂家颜色' AFTER `goods_name`; | ||
38 | - | ||
39 | - | ||
40 | ---3、base_single: | ||
41 | - | ||
42 | -ALTER TABLE `erp_supplier`.`base_single` | ||
43 | -ADD COLUMN `is_suppled` enum('N','Y') DEFAULT 'Y' COMMENT '能否补货' AFTER `size_id`, | ||
44 | -ADD COLUMN `presale_storage_num` int(11) unsigned DEFAULT '0' COMMENT '预售库存', | ||
45 | -ADD INDEX `is_suppled` (`is_suppled`) comment ''; | ||
46 | - | ||
47 | - | ||
48 | - | ||
49 | - | ||
50 | - | ||
51 | - | ||
52 | - | ||
53 | - | ||
54 | - | ||
55 | - | ||
56 | - | ||
57 | - | ||
58 | - | ||
59 | --- erp_product库: | ||
60 | ---1、product: | ||
61 | - | ||
62 | -ALTER TABLE `erp_product`.`product` | ||
63 | -ADD COLUMN `goods_years` smallint(5) DEFAULT 0, | ||
64 | -ADD COLUMN `goods_season` smallint(5) DEFAULT 0 COMMENT '1:春2:夏3:秋4:冬5:春夏6:秋冬' AFTER `goods_years`, | ||
65 | -ADD COLUMN `limit_start_time` int(10) UNSIGNED DEFAULT 0 COMMENT '限购开始时间' AFTER `brand_folder`, | ||
66 | -ADD COLUMN `limit_end_time` int(10) UNSIGNED DEFAULT 0 COMMENT '限购结束时间' AFTER `limit_start_time`, | ||
67 | -ADD COLUMN `expect_shelf_time` int(10) UNSIGNED DEFAULT 0 COMMENT '预计上架时间' AFTER `limit_end_time`, | ||
68 | -ADD COLUMN `factory_code` varchar(100) DEFAULT '' COMMENT '厂家编号' AFTER `expect_shelf_time`, | ||
69 | -ADD COLUMN `age_level` varchar(50) DEFAULT '1' COMMENT '年龄层(1成人 2大童 3小童 逗号分隔)' AFTER `factory_code`, | ||
70 | -CHANGE COLUMN `grade` `grade` char(20) DEFAULT NULL COMMENT '重点款型(是:K,否:null)', | ||
71 | -MODIFY COLUMN `is_outlets` enum('Y','N','B') DEFAULT 'B' COMMENT '是否奥莱 Y:是N:否B:品牌设置' AFTER `is_promotion`, | ||
72 | -ADD COLUMN `is_promotional_gifts` enum('Y','N') DEFAULT 'N' AFTER `goods_season`, | ||
73 | -ADD COLUMN `is_vip` enum('Y','N','B') DEFAULT 'B' COMMENT '是否VIP Y:是N:否B:品牌设置' AFTER `is_promotional_gifts`, | ||
74 | -ADD COLUMN `is_limitbuy` enum('Y','N') DEFAULT 'N' COMMENT '是否限购' AFTER `is_vip`, | ||
75 | -ADD COLUMN `audit_pass_id` int(10) COMMENT '审核通过人id', | ||
76 | -ADD COLUMN `audit_pass_time` int(10) NULL DEFAULT 0 COMMENT '审核通过时间', | ||
77 | -ADD COLUMN `audit_fail_id` int(10) COMMENT '审核不通过人id', | ||
78 | -ADD COLUMN `audit_fail_time` int(10) NULL DEFAULT 0 COMMENT '审核不通过时间', | ||
79 | -ADD COLUMN `operate_info` varchar(255) DEFAULT '' COMMENT '操作信息'; | ||
80 | - | ||
81 | - | ||
82 | -ALTER TABLE `erp_product`.`product` ADD COLUMN `editId` int(10) COMMENT '修改人id'; | ||
83 | - | ||
84 | ---/***添加索引****/ | ||
85 | -ALTER TABLE `erp_product`.`product` | ||
86 | -ADD INDEX `brand_id` (`brand_id`) comment '', | ||
87 | -ADD INDEX `shop_id` (`shop_id`) comment '', | ||
88 | -ADD INDEX `supplier_id` (`supplier_id`) comment '', | ||
89 | -ADD INDEX `attribute` (`attribute`) comment '', | ||
90 | -ADD INDEX `is_jit` (`is_jit`) comment '', | ||
91 | -ADD INDEX `is_outlets` (`is_outlets`) comment '', | ||
92 | -ADD INDEX `is_advance` (`is_advance`) comment ''; | ||
93 | - | ||
94 | ---2、goods: | ||
95 | -ALTER TABLE `erp_product`.`goods` | ||
96 | -ADD COLUMN `factory_goods_name` varchar(50) COMMENT '厂家颜色' AFTER `goods_name`; | ||
97 | - | ||
98 | ---3、storage: | ||
99 | - | ||
100 | -ALTER TABLE `erp_product`.`storage` | ||
101 | -ADD COLUMN `is_suppled` enum('Y','N') DEFAULT 'Y' COMMENT '能否补货' AFTER `update_time`, | ||
102 | -ADD COLUMN `presale_storage_num` int(11) unsigned DEFAULT '0' COMMENT '预售库存', | ||
103 | -ADD INDEX `is_suppled` (`is_suppled`) comment ''; | ||
104 | - | ||
105 | - | ||
106 | - | ||
107 | ---4、product_price: | ||
108 | - | ||
109 | -ALTER TABLE `erp_product`.`product_price` | ||
110 | -CHANGE COLUMN `founder` `founder` int(11) UNSIGNED DEFAULT 0 COMMENT '操作人ID', | ||
111 | -ADD COLUMN `enable_vip` tinyint(3) UNSIGNED DEFAULT 2 COMMENT '是否享受vip折扣:1 根据品牌设置进行折扣 2 开启 3 关闭' AFTER `founder`; | ||
112 | - | ||
113 | - | ||
114 | -alter table erp_product.product add column is_screen enum('Y', 'N') default 'N' COMMENT '是否已拍摄标识'; | ||
115 | -alter table erp_product.product add column is_measure enum('Y', 'N') default 'N' COMMENT '是否已测量标识'; | ||
116 | -alter table erp_product.product add column status smallint default 1 COMMENT ' 8待上架,2待审核,3驳回,4通过,1已上架,0已下架,5再上架待审核,6再上架驳回,7再上架通过'; | ||
117 | -alter table erp_product.product add column first_shelve_time int(10) unsigned DEFAULT '0' COMMENT '首次上架时间'; | ||
118 | -alter table erp_product.product add column shelve_time int(10) unsigned DEFAULT '0' COMMENT '上架时间可作为上新参考'; | ||
119 | -alter table erp_product.product add column `stock` smallint(6) DEFAULT 0 COMMENT '库存'; | ||
120 | -alter table erp_product.product add column `next_status` smallint COMMENT '下一流程状态'; | ||
121 | -Alter table erp_product.product ADD column `founder` int(11) COMMENT '操作人'; | ||
122 | -Alter table erp_product.product ADD column `is_info_miss` enum('Y', 'N') default 'Y' COMMENT '是否信息缺失'; | ||
123 | -create index product_edittime on erp_product.product(`edit_time`); | ||
124 | - | ||
125 | -update erp_product.product set is_info_miss = 'N'; | ||
126 | - | ||
127 | -create table erp_product.product_ext( | ||
128 | - product_skn int COMMENT '商品erp标识', | ||
129 | - product_desc text COMMENT '描述', -- 废弃 | ||
130 | - recommend text COMMENT '小编推荐', -- 新增字段 | ||
131 | - is_hostsell enum('Y', 'N') default 'N' COMMENT '是否热销 Y:是N:否', -- 需要割接 之前直接操作的前台表yh_shops.is_hot | ||
132 | - sales_phrase varchar(100) COMMENT '促销短语', -- 需要割接 之前直接操作的前台表yh_shops.sales_phrase | ||
133 | - is_new enum('Y', 'N') default 'N' COMMENT '是否新品 Y:是N:否', -- 需要割接 之前直接操作的前台表yh_shops.is_hot | ||
134 | - shelves_day int COMMENT '售罄后几天后下架', -- 废弃 | ||
135 | - sell_channels set('0','1','2','3','4','5','6','7','8','9') COMMENT '上架渠道', -- 需要割接 之前直接操作的前台表yh_shops.sell_channels | ||
136 | - phrase varchar(500) COMMENT '商品短评', -- 需要割接 之前直接操作的前台表yh_shops.phrase | ||
137 | - search_keys varchar(500) COMMENT '搜索关键词 以英文逗号分隔', -- | ||
138 | - vedio_url varchar(100) COMMENT '视频链接', -- 新增字段 | ||
139 | - make_crafts varchar(50) COMMENT '制作工艺', -- 新增字段 | ||
140 | - brand_series varchar(50) COMMENT '品牌系列', -- 新增字段 | ||
141 | - brand_model varchar(50) COMMENT '品牌款型', -- 新增字段 | ||
142 | - reject_reason varchar(500) COMMENT '驳回原因' -- 无需同步 | ||
143 | -)ENGINE=INNODB DEFAULT CHARSET=utf8; | ||
144 | -Alter table erp_product.product_ext add primary key(product_skn); | ||
145 | - | ||
146 | --- 变价表和变价日志表 | ||
147 | -alter table erp_product.product_price modify `founder` int(11) unsigned DEFAULT '0' COMMENT '操作人ID'; | ||
148 | -alter table erp_product.product_price_log modify `founder` int(11) unsigned DEFAULT '0' COMMENT '操作人ID'; | ||
149 | - | ||
150 | - | ||
151 | --- 1.4 缺失信息维护 | ||
152 | - | ||
153 | --- 网销信息缺失类型的全量枚举表(无需同步) | ||
154 | --- DROP TABLE IF EXISTS `netsale_infomiss`; | ||
155 | - CREATE TABLE erp_product.netsale_infomiss ( | ||
156 | - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, | ||
157 | - `name` varchar(100) DEFAULT NULL, | ||
158 | - PRIMARY KEY (`id`) | ||
159 | - ) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT '网销信息缺失类型的全量枚举表'; | ||
160 | - | ||
161 | - insert into erp_product.netsale_infomiss (name) values('文本信息'),('尺码信息'),('搜索/标签'); | ||
162 | - | ||
163 | --- 商品和网销信息缺失表的关联关系表(无需同步) | ||
164 | --- DROP TABLE IF EXISTS `netsale_infomiss_relation`; | ||
165 | - CREATE TABLE erp_product.netsale_infomiss_relation ( | ||
166 | - `product_skn` int(11) unsigned NOT NULL, | ||
167 | - `infomiss_id` int(11) unsigned NOT NULL COMMENT 'netsale_infomiss_sort 的主键', | ||
168 | - PRIMARY KEY (`product_skn`, infomiss_id) | ||
169 | - ) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT '网销信息缺失类型和商品的关系表'; | ||
170 | - | ||
171 | --- erp_product | ||
172 | --- 产品参数 | ||
173 | -CREATE TABLE erp_product.product_attribute ( | ||
174 | - `attribute_id` int(11) unsigned NOT NULL AUTO_INCREMENT, | ||
175 | - `attribute_name` varchar(100) DEFAULT NULL, | ||
176 | - `category_id` int(11) unsigned NOT NULL DEFAULT '0', | ||
177 | - `sale_type` int(11) unsigned DEFAULT '0' COMMENT '1:销售属性 2:非销售属性 3:扩展属性', | ||
178 | - `input_type` enum('radio','checkbox','select','text','textarea') DEFAULT NULL COMMENT 'radio 单选\n checkbox 复选\n select 下拉列表\n text 输入框\n textarea 多行输入', | ||
179 | - `attribute_type` tinyint(3) unsigned DEFAULT NULL COMMENT '1 - 可销售属性\n 2 - 非可销售属性\n 3 - 扩展属性', | ||
180 | - `is_must` enum('Y','N') DEFAULT 'N', | ||
181 | - `is_search` enum('Y','N') DEFAULT 'Y', | ||
182 | - `max_value_len` smallint(5) unsigned DEFAULT '50', | ||
183 | - `is_color` enum('Y','N') DEFAULT 'N', | ||
184 | - `is_allow_alias` enum('Y','N') DEFAULT 'N', | ||
185 | - `order_by` int(11) unsigned DEFAULT '0', | ||
186 | - `state` tinyint(3) unsigned DEFAULT '1', | ||
187 | - `remark` varchar(500) DEFAULT NULL, | ||
188 | - `attribute_values` varchar(1000) DEFAULT NULL COMMENT '红色,白色,黑色', | ||
189 | - `belong` tinyint(3) unsigned DEFAULT '10' COMMENT '10系统\n 20商家', | ||
190 | - `create_time` int(10) unsigned DEFAULT NULL, | ||
191 | - `display_position` int(1) unsigned DEFAULT '1' COMMENT '1:基础商品-非销售属性 2:网销信息-上架后补全信息 3:网销信息-商品参数', | ||
192 | - PRIMARY KEY (`attribute_id`) | ||
193 | -) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=utf8; | ||
194 | - | ||
195 | - | ||
196 | -INSERT INTO erp_product.product_attribute(attribute_id,`attribute_name`,`category_id`,`input_type`,`sale_type`,`attribute_values`,`display_position`)VALUES(2001,'弹性',0,'select',2,'[{\"id\":1,\"name\":\"1\"},{\"id\":2,\"name\":\"2\"},{\"id\":3,\"name\":\"3\"},{\"id\":4,\"name\":\"4\"},{\"id\":5,\"name\":\"5\"}]', 2); | ||
197 | -INSERT INTO erp_product.product_attribute(attribute_id,`attribute_name`,`category_id`,`input_type`,`sale_type`,`attribute_values`,`display_position`)VALUES(2002,'厚度',0,'select',2,'[{\"id\":1,\"name\":\"1\"},{\"id\":2,\"name\":\"2\"},{\"id\":3,\"name\":\"3\"},{\"id\":4,\"name\":\"4\"},{\"id\":5,\"name\":\"5\"}]', 2); | ||
198 | -INSERT INTO erp_product.product_attribute(attribute_id,`attribute_name`,`category_id`,`input_type`,`sale_type`,`attribute_values`,`display_position`)VALUES(2003,'柔软度',0,'select',2,'[{\"id\":1,\"name\":\"1\"},{\"id\":2,\"name\":\"2\"},{\"id\":3,\"name\":\"3\"},{\"id\":4,\"name\":\"4\"},{\"id\":5,\"name\":\"5\"}]', 2); | ||
199 | -INSERT INTO erp_product.product_attribute(attribute_id,`attribute_name`,`category_id`,`input_type`,`sale_type`,`attribute_values`,`display_position`)VALUES(2004,'透气性',0,'select',2,'[{\"id\":1,\"name\":\"1\"},{\"id\":2,\"name\":\"2\"},{\"id\":3,\"name\":\"3\"},{\"id\":4,\"name\":\"4\"},{\"id\":5,\"name\":\"5\"}]', 2); | ||
200 | -INSERT INTO erp_product.product_attribute(attribute_id,`attribute_name`,`category_id`, `input_type`,`sale_type`,`attribute_values`,`display_position`)VALUES(2005,'洗涤提示',0,'checkbox',2,'[{\"id\":1,\"name\":\"不可熨烫\"},{\"id\":2,\"name\":\"不可转笼翻转干燥\"},{\"id\":3,\"name\":\"30度水温弱速洗\"},{\"id\":4,\"name\":\"不可氯漂\"},{\"id\":5,\"name\":\"不可干洗\"},{\"id\":6,\"name\":\"不可拧干\"},{\"id\":7,\"name\":\"分色洗涤\"}]', 3); | ||
201 | - | ||
202 | - | ||
203 | - | ||
204 | - | ||
205 | - | ||
206 | - | ||
207 | - | ||
208 | - | ||
209 | - | ||
210 | - | ||
211 | - | ||
212 | - | ||
213 | - | ||
214 | --- 2 yh_shops 库 | ||
215 | --- 2.1 商品的展示店铺 | ||
216 | -create table yh_shops.product_shop_relation( | ||
217 | - product_skn int COMMENT 'SKN', | ||
218 | - shop_id int COMMENT '店铺Id' | ||
219 | -); | ||
220 | -Alter table yh_shops.product_shop_relation add primary key(product_skn, shop_id); | ||
221 | - | ||
222 | --- 标识商品是否是新平台的商品 | ||
223 | -alter table yh_shops.product add column source_flag enum('0', '1') default '0' COMMENT '新平台发布的商品为1 原来则为0'; | ||
224 | - | ||
225 | - | ||
226 | - | ||
227 | - | ||
228 | - | ||
229 | - | ||
230 | - | ||
231 | --- 2.5 预上架上新记录表 | ||
232 | - Alter table yh_shops.product_timing ADD column `product_skn` int(11) unsigned default 0; | ||
233 | - Alter table yh_shops.product_timing ADD column `advance_begin_time` int(10) unsigned; -- 预售开始时间 | ||
234 | - Alter table yh_shops.product_timing ADD column `advance_end_time` int(10) unsigned; -- 预售结束时间 | ||
235 | - Alter table yh_shops.product_timing ADD column `on_new_time` int(10) unsigned; -- 预上架上新时间 | ||
236 | - Alter table yh_shops.product_timing ADD column `out_sale_time` int(10) unsigned; -- 售罄后几天下架时间 | ||
237 | - create index timing_skn on yh_shops.product_timing(`product_skn`); | ||
238 | - Alter table yh_shops.product_timing modify column shelve_time int(10) unsigned COMMENT '预上架架时间'; | ||
239 | - | ||
240 | - | ||
241 | - | ||
242 | - | ||
243 | --- 2.8 平台商品属性值表 | ||
244 | - | ||
245 | -CREATE TABLE yh_shops.product_attribute_property_values ( | ||
246 | - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, | ||
247 | - `product_skn` int(11) unsigned NOT NULL, | ||
248 | - `attribute_id` int(11) unsigned NOT NULL COMMENT '品类属性ID', | ||
249 | - `attribute_value_id` varchar(128) COMMENT '品类属性值ID 多个用逗号分隔', | ||
250 | - `display_position` int(1) unsigned DEFAULT '1' COMMENT '1:基础商品-非销售属性 2:网销信息-上架后补全信息 3:网销信息-商品参数', | ||
251 | - PRIMARY KEY (`id`), | ||
252 | - KEY `attribute_pro_skn_attrid` (`product_skn`,`attribute_id`) | ||
253 | - ) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT '平台商品属性值表'; | ||
254 | - | ||
255 | - | ||
256 | - | ||
257 | - | ||
258 | --- yh_shops | ||
259 | -ALTER TABLE yh_shops.product_standard_relation ADD COLUMN product_skn INT(11) UNSIGNED; | ||
260 | - | ||
261 | -ALTER TABLE yh_shops.`product_collocation` ADD COLUMN product_skn INT(11) UNSIGNED ; | ||
262 | - | ||
263 | --- brand_folder | ||
264 | -ALTER TABLE yh_shops.brand_folder ADD shops_id INT(11) UNSIGNED COMMENT '店铺id'; | ||
265 | -ALTER TABLE yh_shops.brand_folder ADD `create_time` int(10) unsigned DEFAULT '0' COMMENT '创建时间'; | ||
266 | -ALTER TABLE yh_shops.brand_folder ADD `update_time` int(10) unsigned DEFAULT '0' COMMENT '修改时间'; | ||
267 | -ALTER TABLE yh_shops.brand_folder CHANGE parent_id parent_id INT(11) UNSIGNED null ; | ||
268 | -ALTER TABLE yh_shops.brand_folder CHANGE order_by order_by SMALLINT(6) null; | ||
269 | --- brand_series | ||
270 | -ALTER TABLE yh_shops.`brand_series` ADD shops_id INT(11) UNSIGNED COMMENT '店铺id'; | ||
271 | -ALTER TABLE yh_shops.`brand_series` ADD `create_time` int(10) unsigned DEFAULT '0' COMMENT '创建时间'; | ||
272 | -ALTER TABLE yh_shops.`brand_series` ADD `update_time` int(10) unsigned DEFAULT '0' COMMENT '修改时间'; | ||
273 | - -- add key | ||
274 | -ALTER TABLE yh_shops.`brand_series` ADD KEY key_shops_id (shops_id); | ||
275 | -ALTER TABLE yh_shops.`brand_series` ADD KEY key_brand_id (brand_id); | ||
276 | --- set null | ||
277 | -ALTER TABLE yh_shops.brand_series CHANGE parent_id parent_id INT(11) UNSIGNED null ; | ||
278 | -ALTER TABLE yh_shops.brand_series CHANGE order_by order_by SMALLINT(6) null; | ||
279 | - | ||
280 | - | ||
281 | -ALTER TABLE `yh_shops`.`product` | ||
282 | -ADD COLUMN `limit_start_time` int(10) UNSIGNED DEFAULT 0 COMMENT '限购开始时间', | ||
283 | -ADD COLUMN `limit_end_time` int(10) UNSIGNED DEFAULT 0 COMMENT '限购结束时间' AFTER `limit_start_time`, | ||
284 | -ADD COLUMN `expect_shelf_time` int(10) UNSIGNED DEFAULT 0 COMMENT '预计上架时间' AFTER `limit_end_time`, | ||
285 | -ADD COLUMN `product_code` varchar(100) DEFAULT '' COMMENT '厂家编号' AFTER `expect_shelf_time`, | ||
286 | -ADD COLUMN `age_level` varchar(50) DEFAULT '' COMMENT '年龄层(1成人 2大童 3小童 逗号分隔)' AFTER `product_code`, | ||
287 | -ADD COLUMN `goods_years` smallint(5) DEFAULT '0' COMMENT '货品年', | ||
288 | -ADD COLUMN `goods_season` smallint(5) DEFAULT '0' COMMENT '货品季', | ||
289 | -MODIFY COLUMN `is_outlets` enum('Y','N') DEFAULT 'N' COMMENT '是否奥莱 Y:是N:否', | ||
290 | -ADD COLUMN `outlets_setting` enum('B','N','S') DEFAULT 'N' COMMENT '奥特莱斯设置B:品牌设置;S:店铺设置,N:不设置', | ||
291 | -ADD COLUMN `is_promotional_gifts` enum('Y','N') DEFAULT 'N' AFTER `goods_season`; | ||
292 | -ALTER TABLE yh_shops.product | ||
293 | -MODIFY COLUMN `is_outlets` enum('Y','B','N') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'N' COMMENT '是否奥莱 Y:是N:否' AFTER `storage`; | ||
294 | - | ||
295 | -ALTER TABLE yh_shops.product | ||
296 | -ADD COLUMN `series` varchar(100) NULL DEFAULT NULL AFTER `outlets_setting`, | ||
297 | -ADD COLUMN `models` varchar(100) NULL DEFAULT NULL AFTER `series`, | ||
298 | -ADD COLUMN `product_tag` varchar(100) NULL DEFAULT NULL AFTER `models`, | ||
299 | -ADD COLUMN `product_elements` varchar(200) NULL DEFAULT NULL AFTER `product_tag`, | ||
300 | -ADD COLUMN `product_style` varchar(200) NULL AFTER `product_elements`, | ||
301 | -ADD COLUMN `grade` char(20) NULL DEFAULT NULL COMMENT '重点款型(是:K,否:null)' AFTER `product_style`, | ||
302 | -ADD COLUMN `brand_folder` int(5) NULL DEFAULT NULL AFTER `grade`; | ||
303 | - | ||
304 | - | ||
305 | -ALTER TABLE yh_shops.storage | ||
306 | -ADD COLUMN `factory_code` varchar(100) NULL AFTER `create_time`, | ||
307 | -ADD COLUMN `is_suppled` enum('N','Y') NOT NULL DEFAULT 'Y' COMMENT '能否补货' AFTER `factory_code`, | ||
308 | -ADD COLUMN `product_skc` int(11) NOT NULL DEFAULT 0 AFTER `is_suppled`; | ||
309 | ---------------------- | ||
310 | -ALTER TABLE yh_shops.goods | ||
311 | -ADD COLUMN `factory_code` varchar(100) NULL; | ||
312 | --------------------------- | ||
313 | - CREATE TABLE `yh_shops`.`product_ext` ( | ||
314 | - `product_skn` int(11) NOT NULL DEFAULT '0' COMMENT '商品erp标识', | ||
315 | - `product_desc` text COMMENT '描述', | ||
316 | - `recommend` text COMMENT '小编推荐', | ||
317 | - `is_hostsell` enum('Y','N') DEFAULT 'N' COMMENT '是否热销 Y:是N:否', | ||
318 | - `shelves_day` int(11) DEFAULT NULL COMMENT '售罄后几天后下架', | ||
319 | - `search_keys` varchar(500) DEFAULT NULL COMMENT '搜索关键词 以英文逗号分隔', | ||
320 | - `vedio_url` varchar(100) DEFAULT NULL COMMENT '视频链接', | ||
321 | - `make_crafts` varchar(50) DEFAULT NULL COMMENT '制作工艺', | ||
322 | - `brand_series` varchar(50) DEFAULT NULL COMMENT '品牌系列', | ||
323 | - `brand_model` varchar(50) DEFAULT NULL COMMENT '品牌款型', | ||
324 | - `reject_reason` varchar(500) DEFAULT NULL COMMENT '驳回原因', | ||
325 | - PRIMARY KEY (`product_skn`) | ||
326 | -) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
327 | - | ||
328 | - | ||
329 | -ALTER TABLE yh_shops.brand_series ADD COLUMN `bannar_img` varchar(100) DEFAULT NULL; | ||
330 | - | ||
331 | - | ||
332 | - | ||
333 | - | ||
334 | - | ||
335 | - | ||
336 | - | ||
337 | - | ||
338 | - | ||
339 | - | ||
340 | - | ||
341 | - | ||
342 | - | ||
343 | - | ||
344 | - | ||
345 | - | ||
346 | - | ||
347 | --- 拍摄复尺 数据库 erp_product | ||
348 | - | ||
349 | - | ||
350 | -CREATE TABLE erp_product.shoot_requirement( | ||
351 | - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, | ||
352 | - `type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '1 拍摄类型 2 拍摄风格 3 模特类型 4道具类型 5滤镜效果 6摄影场景', | ||
353 | - `status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '1 正常 0 不可用', | ||
354 | - `name` char(50) NOT NULL DEFAULT '', | ||
355 | - `create_time` int(10) unsigned NOT NULL DEFAULT '0', | ||
356 | - `founder` int(10) unsigned NOT NULL DEFAULT '0', | ||
357 | - `founder_name` varchar(50) DEFAULT '' COMMENT '添加人姓名', | ||
358 | - `update_uid` int(10) unsigned DEFAULT '0' COMMENT '修改人id', | ||
359 | - `update_user_name` varchar(50) DEFAULT '' COMMENT '修改人姓名', | ||
360 | - `update_time` int(11) unsigned DEFAULT '0', | ||
361 | - PRIMARY KEY (`id`) | ||
362 | -) ENGINE=InnoDB AUTO_INCREMENT=165 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT; | ||
363 | - | ||
364 | - | ||
365 | ---拍摄管理 加索引 | ||
366 | - ALTER TABLE erp_product.product_photography_picture ADD INDEX ind_product_skc(product_skc); | ||
367 | - ALTER TABLE erp_product.product_photography_picture ADD INDEX ind_product_skn(product_skn); | ||
368 | - ALTER TABLE erp_product.product_photography_picture ADD INDEX ind_product_sku(product_sku); | ||
369 | - ALTER TABLE erp_product.product_photography_list ADD INDEX ind_product_skn(product_skn); | ||
370 | - | ||
371 | - ALTER TABLE erp_product.product_photography_picture ADD founder_name VARCHAR(20) ; | ||
372 | - ALTER TABLE erp_product.product_photography_picture ADD update_uid INT ; | ||
373 | - ALTER TABLE erp_product.product_photography_picture ADD update_name VARCHAR(20) ; | ||
374 | - ALTER TABLE erp_product.product_photography_picture ADD update_time INT ; | ||
375 | - | ||
376 | -----拍摄要求 | ||
377 | - ALTER TABLE erp_product.shoot_requirement ADD `founder_name` VARCHAR(50) DEFAULT '' COMMENT '添加人姓名'; | ||
378 | - ALTER TABLE erp_product.shoot_requirement ADD `update_uid` INT(10) UNSIGNED DEFAULT '0' COMMENT '修改人id'; | ||
379 | - ALTER TABLE erp_product.shoot_requirement ADD `update_user_name` VARCHAR(50) DEFAULT '' COMMENT '修改人姓名'; | ||
380 | - ALTER TABLE erp_product.shoot_requirement ADD`update_time` INT(11) UNSIGNED NULL DEFAULT '0'; | ||
381 | - ALTER TABLE erp_product.shoot_requirement MODIFY `type` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0'COMMENT '1 拍摄类型 2 拍摄风格 3 模特类型 4道具类型 5滤镜效果 6摄影场景'; | ||
382 | - ALTER TABLE erp_product.shoot_requirement MODIFY `status` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0'COMMENT '1 正常 0 删除'; | ||
383 | - | ||
384 | - | ||
385 | - | ||
386 | - | ||
387 | - --前台表 yh_shops | ||
388 | - | ||
389 | -ALTER TABLE yh_shops.model | ||
390 | - ADD COLUMN `english_name` VARCHAR (50) COLLATE utf8_general_ci NULL DEFAULT '' AFTER `model_name`, | ||
391 | - ADD COLUMN `nationality` VARCHAR (50) COLLATE utf8_general_ci NULL DEFAULT '' AFTER `english_name`, | ||
392 | - ADD COLUMN `shoe_size` VARCHAR (20) COLLATE utf8_general_ci NOT NULL DEFAULT '' AFTER `nationality`, | ||
393 | - ADD COLUMN `dress_size` VARCHAR (20) COLLATE utf8_general_ci NOT NULL DEFAULT '' AFTER `shoe_size`, | ||
394 | - ADD COLUMN `model_card` VARCHAR(255) DEFAULT ''COMMENT '模特卡' AFTER `dress_size`, | ||
395 | - ADD COLUMN `status` INT(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '0 禁用 1 启用' AFTER `avatar` , | ||
396 | - CHANGE `model_type` `model_type` TINYINT(4) UNSIGNED NOT NULL DEFAULT 1 COMMENT '1 拍摄模特 2 试穿模特' AFTER `status` , | ||
397 | - CHANGE `create_time` `create_time` INT(10) UNSIGNED NOT NULL DEFAULT 0 AFTER `model_type` , | ||
398 | - ADD COLUMN `update_time` INT(10) UNSIGNED NULL DEFAULT 0 AFTER `create_time` , | ||
399 | - ADD COLUMN `add_uid` INT(10) UNSIGNED NULL DEFAULT 0 COMMENT '添加人id' AFTER `update_time` , | ||
400 | - ADD COLUMN `add_user_name` VARCHAR(20) COLLATE utf8_general_ci NULL AFTER `add_uid` , | ||
401 | - ADD COLUMN `update_uid` INT(10) UNSIGNED NULL DEFAULT 0 COMMENT '修改人id' AFTER `add_user_name` , | ||
402 | - ADD COLUMN `update_user_name` VARCHAR(20) COLLATE utf8_general_ci NULL AFTER `update_uid`; | ||
403 | - | ||
404 | -ALTER TABLE yh_shops.model_card | ||
405 | - ADD COLUMN `model_id` INT NOT NULL DEFAULT 0 AFTER `model_name`; | ||
406 | - | ||
407 | - ALTER TABLE yh_shops.product_size_reference ADD KEY `union_key` (`product_skn`,`size_id`,`gender`); | ||
408 | - | ||
409 | - | ||
410 | - | ||
411 | - | ||
412 | - -- 店铺装修 | ||
413 | - | ||
414 | - --database erp_supplier | ||
415 | -CREATE TABLE `erp_supplier`.`shops_decorator` ( | ||
416 | - `id` int(11) NOT NULL AUTO_INCREMENT, | ||
417 | - `shops_id` int(11) DEFAULT NULL, | ||
418 | - `check_status` int(11) DEFAULT NULL COMMENT '100 暂存 200 待审核 300 审核通过 900 驳回', | ||
419 | - `create_time` int(11) DEFAULT NULL, | ||
420 | - `update_time` int(11) DEFAULT NULL, | ||
421 | - `status` int(11) DEFAULT NULL, | ||
422 | - PRIMARY KEY (`id`) | ||
423 | -) ENGINE=InnoDB AUTO_INCREMENT=213 DEFAULT CHARSET=utf8 COMMENT='店铺装修'; | ||
424 | - | ||
425 | - | ||
426 | -CREATE TABLE `erp_supplier`.`shops_decorator_comment` ( | ||
427 | - `id` int(11) NOT NULL AUTO_INCREMENT, | ||
428 | - `shops_decorator_id` int(11) DEFAULT NULL, | ||
429 | - `shops_decorator_template_id` int(11) DEFAULT NULL, | ||
430 | - `create_time` int(11) DEFAULT NULL, | ||
431 | - `comment` varchar(100) DEFAULT NULL, | ||
432 | - PRIMARY KEY (`id`) | ||
433 | -) ENGINE=InnoDB AUTO_INCREMENT=75 DEFAULT CHARSET=utf8; | ||
434 | - | ||
435 | - | ||
436 | -DROP TABLE IF EXISTS `erp_supplier`.`shops_decorator_template`; | ||
437 | -CREATE TABLE `erp_supplier`.`shops_decorator_template` ( | ||
438 | - `id` int(11) NOT NULL AUTO_INCREMENT, | ||
439 | - `shops_decorator_id` int(11) NOT NULL, | ||
440 | - `platform` varchar(10) NOT NULL COMMENT '平台(PC,APP)', | ||
441 | - `template_type` varchar(10) DEFAULT '2' COMMENT '模板(1:基础模板,2:经典模板)', | ||
442 | - `create_time` int(11) NOT NULL, | ||
443 | - `update_time` int(11) NOT NULL DEFAULT '0', | ||
444 | - `is_enable` enum('N','Y','') DEFAULT 'Y' COMMENT '是否启用该模板', | ||
445 | - PRIMARY KEY (`id`) | ||
446 | -) ENGINE=InnoDB AUTO_INCREMENT=213 DEFAULT CHARSET=utf8 COMMENT='店铺装修模板'; | ||
447 | - | ||
448 | - | ||
449 | -CREATE TABLE `erp_supplier`.`shops_decorator_template_resource` ( | ||
450 | - `id` int(11) NOT NULL AUTO_INCREMENT, | ||
451 | - `shops_decorator_id` int(11) DEFAULT NULL, | ||
452 | - `shops_decorator_template_id` int(11) DEFAULT NULL, | ||
453 | - `resource_name` varchar(50) DEFAULT NULL, | ||
454 | - `resource_data` text, | ||
455 | - `create_time` int(11) DEFAULT NULL, | ||
456 | - `update_time` int(11) DEFAULT NULL, | ||
457 | - PRIMARY KEY (`id`) | ||
458 | -) ENGINE=InnoDB AUTO_INCREMENT=2905 DEFAULT CHARSET=utf8 COMMENT='店铺装修模板信息'; | ||
459 | - | 1 | +--erp_supplier库: |
2 | +--1、base_product: | ||
3 | +ALTER TABLE `erp_supplier`.`base_product` | ||
4 | +CHANGE COLUMN `grade` `grade` char(20) DEFAULT NULL COMMENT '重点款型(是:1,否:null)', | ||
5 | +ADD COLUMN `factory_code` varchar(100) DEFAULT '' COMMENT '厂家编号' AFTER `brand_folder`, | ||
6 | +ADD COLUMN `age_level` varchar(50) DEFAULT '' COMMENT '年龄层(1成人 2大童 3小童 逗号分隔)' AFTER `factory_code`, | ||
7 | +MODIFY COLUMN `goods_season` smallint(5) NULL DEFAULT 0 COMMENT '1:春2:夏3:秋4:冬5:春夏6:秋冬' AFTER `goods_years`, | ||
8 | +ADD COLUMN `is_vip` enum('Y','N','B') NULL DEFAULT 'B' COMMENT '是否VIP Y:是N:否B:品牌设置' AFTER `age_level`, | ||
9 | +ADD COLUMN `is_limitbuy` enum('Y','N') NULL DEFAULT 'N' COMMENT '是否限购' AFTER `is_vip`, | ||
10 | +ADD COLUMN `limit_start_time` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '限购开始时间' AFTER `is_limitbuy`, | ||
11 | +ADD COLUMN `limit_end_time` int(10) NULL DEFAULT 0 COMMENT '限购结束时间' AFTER `limit_start_time`, | ||
12 | +ADD COLUMN `expect_shelf_time` int(10) NULL DEFAULT 0 COMMENT '预计上架时间' AFTER `limit_end_time`, | ||
13 | +ADD COLUMN `is_outlets` enum('Y','N','B') NULL DEFAULT 'B' COMMENT '是否奥莱 Y:是N:否B:品牌设置' AFTER `expect_shelf_time`, | ||
14 | +ADD COLUMN `seasons` varchar(100) DEFAULT '' COMMENT '适销季 夏:summer 冬:winter 四季:seasons', | ||
15 | +ADD COLUMN `reason` varchar(255) DEFAULT '' COMMENT '审批驳回原因', | ||
16 | +ADD COLUMN `editId` int(10) COMMENT '修改人id', | ||
17 | +ADD COLUMN `audit_pass_id` int(10) COMMENT '审核通过人id', | ||
18 | +ADD COLUMN `audit_pass_time` int(10) NULL DEFAULT 0 COMMENT '审核通过时间', | ||
19 | +ADD COLUMN `audit_fail_id` int(10) COMMENT '审核不通过人id', | ||
20 | +ADD COLUMN `audit_fail_time` int(10) NULL DEFAULT 0 COMMENT '审核不通过时间', | ||
21 | +ADD COLUMN `operate_info` varchar(255) DEFAULT '' COMMENT '操作信息'; | ||
22 | + | ||
23 | + | ||
24 | +--/**建立索引***/ | ||
25 | +ALTER TABLE `erp_supplier`.`base_product` | ||
26 | +ADD INDEX `brand_id` (`brand_id`) comment '', | ||
27 | +ADD INDEX `shop_id` (`shop_id`) comment '', | ||
28 | +ADD INDEX `supplier_id` (`supplier_id`) comment '', | ||
29 | +ADD INDEX `is_auditing` (`is_auditing`) comment '', | ||
30 | +ADD INDEX `attribute` (`attribute`) comment '', | ||
31 | +ADD INDEX `is_jit` (`is_jit`) comment '', | ||
32 | +ADD INDEX `is_advance` (`is_advance`) comment '', | ||
33 | +ADD INDEX `is_outlets` (`is_outlets`) comment ''; | ||
34 | + | ||
35 | +--2、base_goods: | ||
36 | +ALTER TABLE `erp_supplier`.`base_goods` | ||
37 | +ADD COLUMN `factory_goods_name` varchar(50) COMMENT '厂家颜色' AFTER `goods_name`; | ||
38 | + | ||
39 | + | ||
40 | +--3、base_single: | ||
41 | + | ||
42 | +ALTER TABLE `erp_supplier`.`base_single` | ||
43 | +ADD COLUMN `is_suppled` enum('N','Y') DEFAULT 'Y' COMMENT '能否补货' AFTER `size_id`, | ||
44 | +ADD COLUMN `presale_storage_num` int(11) unsigned DEFAULT '0' COMMENT '预售库存', | ||
45 | +ADD INDEX `is_suppled` (`is_suppled`) comment ''; | ||
46 | + | ||
47 | + | ||
48 | + | ||
49 | + | ||
50 | + | ||
51 | + | ||
52 | + | ||
53 | + | ||
54 | + | ||
55 | + | ||
56 | + | ||
57 | + | ||
58 | + | ||
59 | +-- erp_product库: | ||
60 | +--1、product: | ||
61 | + | ||
62 | +ALTER TABLE `erp_product`.`product` | ||
63 | +ADD COLUMN `goods_years` smallint(5) DEFAULT 0, | ||
64 | +ADD COLUMN `goods_season` smallint(5) DEFAULT 0 COMMENT '1:春2:夏3:秋4:冬5:春夏6:秋冬' AFTER `goods_years`, | ||
65 | +ADD COLUMN `limit_start_time` int(10) UNSIGNED DEFAULT 0 COMMENT '限购开始时间' AFTER `brand_folder`, | ||
66 | +ADD COLUMN `limit_end_time` int(10) UNSIGNED DEFAULT 0 COMMENT '限购结束时间' AFTER `limit_start_time`, | ||
67 | +ADD COLUMN `expect_shelf_time` int(10) UNSIGNED DEFAULT 0 COMMENT '预计上架时间' AFTER `limit_end_time`, | ||
68 | +ADD COLUMN `factory_code` varchar(100) DEFAULT '' COMMENT '厂家编号' AFTER `expect_shelf_time`, | ||
69 | +ADD COLUMN `age_level` varchar(50) DEFAULT '1' COMMENT '年龄层(1成人 2大童 3小童 逗号分隔)' AFTER `factory_code`, | ||
70 | +CHANGE COLUMN `grade` `grade` char(20) DEFAULT NULL COMMENT '重点款型(是:K,否:null)', | ||
71 | +MODIFY COLUMN `is_outlets` enum('Y','N','B') DEFAULT 'B' COMMENT '是否奥莱 Y:是N:否B:品牌设置' AFTER `is_promotion`, | ||
72 | +ADD COLUMN `is_promotional_gifts` enum('Y','N') DEFAULT 'N' AFTER `goods_season`, | ||
73 | +ADD COLUMN `is_vip` enum('Y','N','B') DEFAULT 'B' COMMENT '是否VIP Y:是N:否B:品牌设置' AFTER `is_promotional_gifts`, | ||
74 | +ADD COLUMN `is_limitbuy` enum('Y','N') DEFAULT 'N' COMMENT '是否限购' AFTER `is_vip`, | ||
75 | +ADD COLUMN `audit_pass_id` int(10) COMMENT '审核通过人id', | ||
76 | +ADD COLUMN `audit_pass_time` int(10) NULL DEFAULT 0 COMMENT '审核通过时间', | ||
77 | +ADD COLUMN `audit_fail_id` int(10) COMMENT '审核不通过人id', | ||
78 | +ADD COLUMN `audit_fail_time` int(10) NULL DEFAULT 0 COMMENT '审核不通过时间', | ||
79 | +ADD COLUMN `operate_info` varchar(255) DEFAULT '' COMMENT '操作信息'; | ||
80 | + | ||
81 | + | ||
82 | +ALTER TABLE `erp_product`.`product` ADD COLUMN `editId` int(10) COMMENT '修改人id'; | ||
83 | + | ||
84 | +--/***添加索引****/ | ||
85 | +ALTER TABLE `erp_product`.`product` | ||
86 | +ADD INDEX `brand_id` (`brand_id`) comment '', | ||
87 | +ADD INDEX `shop_id` (`shop_id`) comment '', | ||
88 | +ADD INDEX `supplier_id` (`supplier_id`) comment '', | ||
89 | +ADD INDEX `attribute` (`attribute`) comment '', | ||
90 | +ADD INDEX `is_jit` (`is_jit`) comment '', | ||
91 | +ADD INDEX `is_outlets` (`is_outlets`) comment '', | ||
92 | +ADD INDEX `is_advance` (`is_advance`) comment ''; | ||
93 | + | ||
94 | +--2、goods: | ||
95 | +ALTER TABLE `erp_product`.`goods` | ||
96 | +ADD COLUMN `factory_goods_name` varchar(50) COMMENT '厂家颜色' AFTER `goods_name`; | ||
97 | + | ||
98 | +--3、storage: | ||
99 | + | ||
100 | +ALTER TABLE `erp_product`.`storage` | ||
101 | +ADD COLUMN `is_suppled` enum('Y','N') DEFAULT 'Y' COMMENT '能否补货' AFTER `update_time`, | ||
102 | +ADD COLUMN `presale_storage_num` int(11) unsigned DEFAULT '0' COMMENT '预售库存', | ||
103 | +ADD INDEX `is_suppled` (`is_suppled`) comment ''; | ||
104 | + | ||
105 | + | ||
106 | + | ||
107 | +--4、product_price: | ||
108 | + | ||
109 | +ALTER TABLE `erp_product`.`product_price` | ||
110 | +CHANGE COLUMN `founder` `founder` int(11) UNSIGNED DEFAULT 0 COMMENT '操作人ID', | ||
111 | +ADD COLUMN `enable_vip` tinyint(3) UNSIGNED DEFAULT 2 COMMENT '是否享受vip折扣:1 根据品牌设置进行折扣 2 开启 3 关闭' AFTER `founder`; | ||
112 | + | ||
113 | + | ||
114 | +alter table erp_product.product add column is_screen enum('Y', 'N') default 'N' COMMENT '是否已拍摄标识'; | ||
115 | +alter table erp_product.product add column is_measure enum('Y', 'N') default 'N' COMMENT '是否已测量标识'; | ||
116 | +alter table erp_product.product add column status smallint default 1 COMMENT ' 8待上架,2待审核,3驳回,4通过,1已上架,0已下架,5再上架待审核,6再上架驳回,7再上架通过'; | ||
117 | +alter table erp_product.product add column first_shelve_time int(10) unsigned DEFAULT '0' COMMENT '首次上架时间'; | ||
118 | +alter table erp_product.product add column shelve_time int(10) unsigned DEFAULT '0' COMMENT '上架时间可作为上新参考'; | ||
119 | +alter table erp_product.product add column `stock` smallint(6) DEFAULT 0 COMMENT '库存'; | ||
120 | +alter table erp_product.product add column `next_status` smallint COMMENT '下一流程状态'; | ||
121 | +Alter table erp_product.product ADD column `founder` int(11) COMMENT '操作人'; | ||
122 | +Alter table erp_product.product ADD column `is_info_miss` enum('Y', 'N') default 'Y' COMMENT '是否信息缺失'; | ||
123 | +create index product_edittime on erp_product.product(`edit_time`); | ||
124 | + | ||
125 | +update erp_product.product set is_info_miss = 'N'; | ||
126 | + | ||
127 | +create table erp_product.product_ext( | ||
128 | + product_skn int COMMENT '商品erp标识', | ||
129 | + product_desc text COMMENT '描述', -- 废弃 | ||
130 | + recommend text COMMENT '小编推荐', -- 新增字段 | ||
131 | + is_hostsell enum('Y', 'N') default 'N' COMMENT '是否热销 Y:是N:否', -- 需要割接 之前直接操作的前台表yh_shops.is_hot | ||
132 | + sales_phrase varchar(100) COMMENT '促销短语', -- 需要割接 之前直接操作的前台表yh_shops.sales_phrase | ||
133 | + is_new enum('Y', 'N') default 'N' COMMENT '是否新品 Y:是N:否', -- 需要割接 之前直接操作的前台表yh_shops.is_hot | ||
134 | + shelves_day int COMMENT '售罄后几天后下架', -- 废弃 | ||
135 | + sell_channels set('0','1','2','3','4','5','6','7','8','9') COMMENT '上架渠道', -- 需要割接 之前直接操作的前台表yh_shops.sell_channels | ||
136 | + phrase varchar(500) COMMENT '商品短评', -- 需要割接 之前直接操作的前台表yh_shops.phrase | ||
137 | + search_keys varchar(500) COMMENT '搜索关键词 以英文逗号分隔', -- | ||
138 | + vedio_url varchar(100) COMMENT '视频链接', -- 新增字段 | ||
139 | + make_crafts varchar(50) COMMENT '制作工艺', -- 新增字段 | ||
140 | + brand_series varchar(50) COMMENT '品牌系列', -- 新增字段 | ||
141 | + brand_model varchar(50) COMMENT '品牌款型', -- 新增字段 | ||
142 | + reject_reason varchar(500) COMMENT '驳回原因' -- 无需同步 | ||
143 | +)ENGINE=INNODB DEFAULT CHARSET=utf8; | ||
144 | +Alter table erp_product.product_ext add primary key(product_skn); | ||
145 | + | ||
146 | +-- 变价表和变价日志表 | ||
147 | +alter table erp_product.product_price modify `founder` int(11) unsigned DEFAULT '0' COMMENT '操作人ID'; | ||
148 | +alter table erp_product.product_price_log modify `founder` int(11) unsigned DEFAULT '0' COMMENT '操作人ID'; | ||
149 | + | ||
150 | + | ||
151 | +-- 1.4 缺失信息维护 | ||
152 | + | ||
153 | +-- 网销信息缺失类型的全量枚举表(无需同步) | ||
154 | +-- DROP TABLE IF EXISTS `netsale_infomiss`; | ||
155 | + CREATE TABLE erp_product.netsale_infomiss ( | ||
156 | + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, | ||
157 | + `name` varchar(100) DEFAULT NULL, | ||
158 | + PRIMARY KEY (`id`) | ||
159 | + ) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT '网销信息缺失类型的全量枚举表'; | ||
160 | + | ||
161 | + insert into erp_product.netsale_infomiss (name) values('文本信息'),('尺码信息'),('搜索/标签'); | ||
162 | + | ||
163 | +-- 商品和网销信息缺失表的关联关系表(无需同步) | ||
164 | +-- DROP TABLE IF EXISTS `netsale_infomiss_relation`; | ||
165 | + CREATE TABLE erp_product.netsale_infomiss_relation ( | ||
166 | + `product_skn` int(11) unsigned NOT NULL, | ||
167 | + `infomiss_id` int(11) unsigned NOT NULL COMMENT 'netsale_infomiss_sort 的主键', | ||
168 | + PRIMARY KEY (`product_skn`, infomiss_id) | ||
169 | + ) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT '网销信息缺失类型和商品的关系表'; | ||
170 | + | ||
171 | +-- erp_product | ||
172 | +-- 产品参数 | ||
173 | +CREATE TABLE erp_product.product_attribute ( | ||
174 | + `attribute_id` int(11) unsigned NOT NULL AUTO_INCREMENT, | ||
175 | + `attribute_name` varchar(100) DEFAULT NULL, | ||
176 | + `category_id` int(11) unsigned NOT NULL DEFAULT '0', | ||
177 | + `sale_type` int(11) unsigned DEFAULT '0' COMMENT '1:销售属性 2:非销售属性 3:扩展属性', | ||
178 | + `input_type` enum('radio','checkbox','select','text','textarea') DEFAULT NULL COMMENT 'radio 单选\n checkbox 复选\n select 下拉列表\n text 输入框\n textarea 多行输入', | ||
179 | + `attribute_type` tinyint(3) unsigned DEFAULT NULL COMMENT '1 - 可销售属性\n 2 - 非可销售属性\n 3 - 扩展属性', | ||
180 | + `is_must` enum('Y','N') DEFAULT 'N', | ||
181 | + `is_search` enum('Y','N') DEFAULT 'Y', | ||
182 | + `max_value_len` smallint(5) unsigned DEFAULT '50', | ||
183 | + `is_color` enum('Y','N') DEFAULT 'N', | ||
184 | + `is_allow_alias` enum('Y','N') DEFAULT 'N', | ||
185 | + `order_by` int(11) unsigned DEFAULT '0', | ||
186 | + `state` tinyint(3) unsigned DEFAULT '1', | ||
187 | + `remark` varchar(500) DEFAULT NULL, | ||
188 | + `attribute_values` varchar(1000) DEFAULT NULL COMMENT '红色,白色,黑色', | ||
189 | + `belong` tinyint(3) unsigned DEFAULT '10' COMMENT '10系统\n 20商家', | ||
190 | + `create_time` int(10) unsigned DEFAULT NULL, | ||
191 | + `display_position` int(1) unsigned DEFAULT '1' COMMENT '1:基础商品-非销售属性 2:网销信息-上架后补全信息 3:网销信息-商品参数', | ||
192 | + PRIMARY KEY (`attribute_id`) | ||
193 | +) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=utf8; | ||
194 | + | ||
195 | + | ||
196 | +INSERT INTO erp_product.product_attribute(attribute_id,`attribute_name`,`category_id`,`input_type`,`sale_type`,`attribute_values`,`display_position`)VALUES(2001,'弹性',0,'select',2,'[{\"id\":1,\"name\":\"1\"},{\"id\":2,\"name\":\"2\"},{\"id\":3,\"name\":\"3\"},{\"id\":4,\"name\":\"4\"},{\"id\":5,\"name\":\"5\"}]', 2); | ||
197 | +INSERT INTO erp_product.product_attribute(attribute_id,`attribute_name`,`category_id`,`input_type`,`sale_type`,`attribute_values`,`display_position`)VALUES(2002,'厚度',0,'select',2,'[{\"id\":1,\"name\":\"1\"},{\"id\":2,\"name\":\"2\"},{\"id\":3,\"name\":\"3\"},{\"id\":4,\"name\":\"4\"},{\"id\":5,\"name\":\"5\"}]', 2); | ||
198 | +INSERT INTO erp_product.product_attribute(attribute_id,`attribute_name`,`category_id`,`input_type`,`sale_type`,`attribute_values`,`display_position`)VALUES(2003,'柔软度',0,'select',2,'[{\"id\":1,\"name\":\"1\"},{\"id\":2,\"name\":\"2\"},{\"id\":3,\"name\":\"3\"},{\"id\":4,\"name\":\"4\"},{\"id\":5,\"name\":\"5\"}]', 2); | ||
199 | +INSERT INTO erp_product.product_attribute(attribute_id,`attribute_name`,`category_id`,`input_type`,`sale_type`,`attribute_values`,`display_position`)VALUES(2004,'透气性',0,'select',2,'[{\"id\":1,\"name\":\"1\"},{\"id\":2,\"name\":\"2\"},{\"id\":3,\"name\":\"3\"},{\"id\":4,\"name\":\"4\"},{\"id\":5,\"name\":\"5\"}]', 2); | ||
200 | +INSERT INTO erp_product.product_attribute(attribute_id,`attribute_name`,`category_id`, `input_type`,`sale_type`,`attribute_values`,`display_position`)VALUES(2005,'洗涤提示',0,'checkbox',2,'[{\"id\":1,\"name\":\"不可熨烫\"},{\"id\":2,\"name\":\"不可转笼翻转干燥\"},{\"id\":3,\"name\":\"30度水温弱速洗\"},{\"id\":4,\"name\":\"不可氯漂\"},{\"id\":5,\"name\":\"不可干洗\"},{\"id\":6,\"name\":\"不可拧干\"},{\"id\":7,\"name\":\"分色洗涤\"}]', 3); | ||
201 | + | ||
202 | + | ||
203 | + | ||
204 | + | ||
205 | + | ||
206 | + | ||
207 | + | ||
208 | + | ||
209 | + | ||
210 | + | ||
211 | + | ||
212 | + | ||
213 | + | ||
214 | +-- 2 yh_shops 库 | ||
215 | +-- 2.1 商品的展示店铺 | ||
216 | +create table yh_shops.product_shop_relation( | ||
217 | + product_skn int COMMENT 'SKN', | ||
218 | + shop_id int COMMENT '店铺Id' | ||
219 | +); | ||
220 | +Alter table yh_shops.product_shop_relation add primary key(product_skn, shop_id); | ||
221 | + | ||
222 | +-- 标识商品是否是新平台的商品 | ||
223 | +alter table yh_shops.product add column source_flag enum('0', '1') default '0' COMMENT '新平台发布的商品为1 原来则为0'; | ||
224 | + | ||
225 | + | ||
226 | + | ||
227 | + | ||
228 | + | ||
229 | + | ||
230 | + | ||
231 | +-- 2.5 预上架上新记录表 | ||
232 | + Alter table yh_shops.product_timing ADD column `product_skn` int(11) unsigned default 0; | ||
233 | + Alter table yh_shops.product_timing ADD column `advance_begin_time` int(10) unsigned; -- 预售开始时间 | ||
234 | + Alter table yh_shops.product_timing ADD column `advance_end_time` int(10) unsigned; -- 预售结束时间 | ||
235 | + Alter table yh_shops.product_timing ADD column `on_new_time` int(10) unsigned; -- 预上架上新时间 | ||
236 | + Alter table yh_shops.product_timing ADD column `out_sale_time` int(10) unsigned; -- 售罄后几天下架时间 | ||
237 | + create index timing_skn on yh_shops.product_timing(`product_skn`); | ||
238 | + Alter table yh_shops.product_timing modify column shelve_time int(10) unsigned COMMENT '预上架架时间'; | ||
239 | + | ||
240 | + | ||
241 | + | ||
242 | + | ||
243 | +-- 2.8 平台商品属性值表 | ||
244 | + | ||
245 | +CREATE TABLE yh_shops.product_attribute_property_values ( | ||
246 | + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, | ||
247 | + `product_skn` int(11) unsigned NOT NULL, | ||
248 | + `attribute_id` int(11) unsigned NOT NULL COMMENT '品类属性ID', | ||
249 | + `attribute_value_id` varchar(128) COMMENT '品类属性值ID 多个用逗号分隔', | ||
250 | + `display_position` int(1) unsigned DEFAULT '1' COMMENT '1:基础商品-非销售属性 2:网销信息-上架后补全信息 3:网销信息-商品参数', | ||
251 | + PRIMARY KEY (`id`), | ||
252 | + KEY `attribute_pro_skn_attrid` (`product_skn`,`attribute_id`) | ||
253 | + ) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT '平台商品属性值表'; | ||
254 | + | ||
255 | + | ||
256 | + | ||
257 | + | ||
258 | +-- yh_shops | ||
259 | +ALTER TABLE yh_shops.product_standard_relation ADD COLUMN product_skn INT(11) UNSIGNED; | ||
260 | + | ||
261 | +ALTER TABLE yh_shops.`product_collocation` ADD COLUMN product_skn INT(11) UNSIGNED ; | ||
262 | + | ||
263 | +-- brand_folder | ||
264 | +ALTER TABLE yh_shops.brand_folder ADD shops_id INT(11) UNSIGNED COMMENT '店铺id'; | ||
265 | +ALTER TABLE yh_shops.brand_folder ADD `create_time` int(10) unsigned DEFAULT '0' COMMENT '创建时间'; | ||
266 | +ALTER TABLE yh_shops.brand_folder ADD `update_time` int(10) unsigned DEFAULT '0' COMMENT '修改时间'; | ||
267 | +ALTER TABLE yh_shops.brand_folder CHANGE parent_id parent_id INT(11) UNSIGNED null ; | ||
268 | +ALTER TABLE yh_shops.brand_folder CHANGE order_by order_by SMALLINT(6) null; | ||
269 | +-- brand_series | ||
270 | +ALTER TABLE yh_shops.`brand_series` ADD shops_id INT(11) UNSIGNED COMMENT '店铺id'; | ||
271 | +ALTER TABLE yh_shops.`brand_series` ADD `create_time` int(10) unsigned DEFAULT '0' COMMENT '创建时间'; | ||
272 | +ALTER TABLE yh_shops.`brand_series` ADD `update_time` int(10) unsigned DEFAULT '0' COMMENT '修改时间'; | ||
273 | + -- add key | ||
274 | +ALTER TABLE yh_shops.`brand_series` ADD KEY key_shops_id (shops_id); | ||
275 | +ALTER TABLE yh_shops.`brand_series` ADD KEY key_brand_id (brand_id); | ||
276 | +-- set null | ||
277 | +ALTER TABLE yh_shops.brand_series CHANGE parent_id parent_id INT(11) UNSIGNED null ; | ||
278 | +ALTER TABLE yh_shops.brand_series CHANGE order_by order_by SMALLINT(6) null; | ||
279 | + | ||
280 | + | ||
281 | +ALTER TABLE `yh_shops`.`product` | ||
282 | +ADD COLUMN `limit_start_time` int(10) UNSIGNED DEFAULT 0 COMMENT '限购开始时间', | ||
283 | +ADD COLUMN `limit_end_time` int(10) UNSIGNED DEFAULT 0 COMMENT '限购结束时间' AFTER `limit_start_time`, | ||
284 | +ADD COLUMN `expect_shelf_time` int(10) UNSIGNED DEFAULT 0 COMMENT '预计上架时间' AFTER `limit_end_time`, | ||
285 | +ADD COLUMN `product_code` varchar(100) DEFAULT '' COMMENT '厂家编号' AFTER `expect_shelf_time`, | ||
286 | +ADD COLUMN `age_level` varchar(50) DEFAULT '' COMMENT '年龄层(1成人 2大童 3小童 逗号分隔)' AFTER `product_code`, | ||
287 | +ADD COLUMN `goods_years` smallint(5) DEFAULT '0' COMMENT '货品年', | ||
288 | +ADD COLUMN `goods_season` smallint(5) DEFAULT '0' COMMENT '货品季', | ||
289 | +MODIFY COLUMN `is_outlets` enum('Y','N') DEFAULT 'N' COMMENT '是否奥莱 Y:是N:否', | ||
290 | +ADD COLUMN `outlets_setting` enum('B','N','S') DEFAULT 'N' COMMENT '奥特莱斯设置B:品牌设置;S:店铺设置,N:不设置', | ||
291 | +ADD COLUMN `is_promotional_gifts` enum('Y','N') DEFAULT 'N' AFTER `goods_season`; | ||
292 | +ALTER TABLE yh_shops.product | ||
293 | +MODIFY COLUMN `is_outlets` enum('Y','B','N') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'N' COMMENT '是否奥莱 Y:是N:否' AFTER `storage`; | ||
294 | + | ||
295 | +ALTER TABLE yh_shops.product | ||
296 | +ADD COLUMN `series` varchar(100) NULL DEFAULT NULL AFTER `outlets_setting`, | ||
297 | +ADD COLUMN `models` varchar(100) NULL DEFAULT NULL AFTER `series`, | ||
298 | +ADD COLUMN `product_tag` varchar(100) NULL DEFAULT NULL AFTER `models`, | ||
299 | +ADD COLUMN `product_elements` varchar(200) NULL DEFAULT NULL AFTER `product_tag`, | ||
300 | +ADD COLUMN `product_style` varchar(200) NULL AFTER `product_elements`, | ||
301 | +ADD COLUMN `grade` char(20) NULL DEFAULT NULL COMMENT '重点款型(是:K,否:null)' AFTER `product_style`, | ||
302 | +ADD COLUMN `brand_folder` int(5) NULL DEFAULT NULL AFTER `grade`; | ||
303 | + | ||
304 | + | ||
305 | +ALTER TABLE yh_shops.storage | ||
306 | +ADD COLUMN `factory_code` varchar(100) NULL AFTER `create_time`, | ||
307 | +ADD COLUMN `is_suppled` enum('N','Y') NOT NULL DEFAULT 'Y' COMMENT '能否补货' AFTER `factory_code`, | ||
308 | +ADD COLUMN `product_skc` int(11) NOT NULL DEFAULT 0 AFTER `is_suppled`; | ||
309 | +--------------------- | ||
310 | +ALTER TABLE yh_shops.goods | ||
311 | +ADD COLUMN `factory_code` varchar(100) NULL; | ||
312 | +-------------------------- | ||
313 | + CREATE TABLE `yh_shops`.`product_ext` ( | ||
314 | + `product_skn` int(11) NOT NULL DEFAULT '0' COMMENT '商品erp标识', | ||
315 | + `product_desc` text COMMENT '描述', | ||
316 | + `recommend` text COMMENT '小编推荐', | ||
317 | + `is_hostsell` enum('Y','N') DEFAULT 'N' COMMENT '是否热销 Y:是N:否', | ||
318 | + `shelves_day` int(11) DEFAULT NULL COMMENT '售罄后几天后下架', | ||
319 | + `search_keys` varchar(500) DEFAULT NULL COMMENT '搜索关键词 以英文逗号分隔', | ||
320 | + `vedio_url` varchar(100) DEFAULT NULL COMMENT '视频链接', | ||
321 | + `make_crafts` varchar(50) DEFAULT NULL COMMENT '制作工艺', | ||
322 | + `brand_series` varchar(50) DEFAULT NULL COMMENT '品牌系列', | ||
323 | + `brand_model` varchar(50) DEFAULT NULL COMMENT '品牌款型', | ||
324 | + `reject_reason` varchar(500) DEFAULT NULL COMMENT '驳回原因', | ||
325 | + PRIMARY KEY (`product_skn`) | ||
326 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
327 | + | ||
328 | + | ||
329 | +ALTER TABLE yh_shops.brand_series ADD COLUMN `bannar_img` varchar(100) DEFAULT NULL; | ||
330 | + | ||
331 | + | ||
332 | + | ||
333 | + | ||
334 | + | ||
335 | + | ||
336 | + | ||
337 | + | ||
338 | + | ||
339 | + | ||
340 | + | ||
341 | + | ||
342 | + | ||
343 | + | ||
344 | + | ||
345 | + | ||
346 | + | ||
347 | +-- 拍摄复尺 数据库 erp_product | ||
348 | + | ||
349 | + | ||
350 | +CREATE TABLE erp_product.shoot_requirement( | ||
351 | + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, | ||
352 | + `type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '1 拍摄类型 2 拍摄风格 3 模特类型 4道具类型 5滤镜效果 6摄影场景', | ||
353 | + `status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '1 正常 0 不可用', | ||
354 | + `name` char(50) NOT NULL DEFAULT '', | ||
355 | + `create_time` int(10) unsigned NOT NULL DEFAULT '0', | ||
356 | + `founder` int(10) unsigned NOT NULL DEFAULT '0', | ||
357 | + `founder_name` varchar(50) DEFAULT '' COMMENT '添加人姓名', | ||
358 | + `update_uid` int(10) unsigned DEFAULT '0' COMMENT '修改人id', | ||
359 | + `update_user_name` varchar(50) DEFAULT '' COMMENT '修改人姓名', | ||
360 | + `update_time` int(11) unsigned DEFAULT '0', | ||
361 | + PRIMARY KEY (`id`) | ||
362 | +) ENGINE=InnoDB AUTO_INCREMENT=165 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT; | ||
363 | + | ||
364 | + | ||
365 | +--拍摄管理 加索引 | ||
366 | + ALTER TABLE erp_product.product_photography_picture ADD INDEX ind_product_skc(product_skc); | ||
367 | + ALTER TABLE erp_product.product_photography_picture ADD INDEX ind_product_skn(product_skn); | ||
368 | + ALTER TABLE erp_product.product_photography_picture ADD INDEX ind_product_sku(product_sku); | ||
369 | + ALTER TABLE erp_product.product_photography_list ADD INDEX ind_product_skn(product_skn); | ||
370 | + | ||
371 | + ALTER TABLE erp_product.product_photography_picture ADD founder_name VARCHAR(20) ; | ||
372 | + ALTER TABLE erp_product.product_photography_picture ADD update_uid INT ; | ||
373 | + ALTER TABLE erp_product.product_photography_picture ADD update_name VARCHAR(20) ; | ||
374 | + ALTER TABLE erp_product.product_photography_picture ADD update_time INT ; | ||
375 | + | ||
376 | +----拍摄要求 | ||
377 | + ALTER TABLE erp_product.shoot_requirement ADD `founder_name` VARCHAR(50) DEFAULT '' COMMENT '添加人姓名'; | ||
378 | + ALTER TABLE erp_product.shoot_requirement ADD `update_uid` INT(10) UNSIGNED DEFAULT '0' COMMENT '修改人id'; | ||
379 | + ALTER TABLE erp_product.shoot_requirement ADD `update_user_name` VARCHAR(50) DEFAULT '' COMMENT '修改人姓名'; | ||
380 | + ALTER TABLE erp_product.shoot_requirement ADD`update_time` INT(11) UNSIGNED NULL DEFAULT '0'; | ||
381 | + ALTER TABLE erp_product.shoot_requirement MODIFY `type` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0'COMMENT '1 拍摄类型 2 拍摄风格 3 模特类型 4道具类型 5滤镜效果 6摄影场景'; | ||
382 | + ALTER TABLE erp_product.shoot_requirement MODIFY `status` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0'COMMENT '1 正常 0 删除'; | ||
383 | + | ||
384 | + | ||
385 | + | ||
386 | + | ||
387 | + --前台表 yh_shops | ||
388 | + | ||
389 | +ALTER TABLE yh_shops.model | ||
390 | + ADD COLUMN `english_name` VARCHAR (50) COLLATE utf8_general_ci NULL DEFAULT '' AFTER `model_name`, | ||
391 | + ADD COLUMN `nationality` VARCHAR (50) COLLATE utf8_general_ci NULL DEFAULT '' AFTER `english_name`, | ||
392 | + ADD COLUMN `shoe_size` VARCHAR (20) COLLATE utf8_general_ci NOT NULL DEFAULT '' AFTER `nationality`, | ||
393 | + ADD COLUMN `dress_size` VARCHAR (20) COLLATE utf8_general_ci NOT NULL DEFAULT '' AFTER `shoe_size`, | ||
394 | + ADD COLUMN `model_card` VARCHAR(255) DEFAULT ''COMMENT '模特卡' AFTER `dress_size`, | ||
395 | + ADD COLUMN `status` INT(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '0 禁用 1 启用' AFTER `avatar` , | ||
396 | + CHANGE `model_type` `model_type` TINYINT(4) UNSIGNED NOT NULL DEFAULT 1 COMMENT '1 拍摄模特 2 试穿模特' AFTER `status` , | ||
397 | + CHANGE `create_time` `create_time` INT(10) UNSIGNED NOT NULL DEFAULT 0 AFTER `model_type` , | ||
398 | + ADD COLUMN `update_time` INT(10) UNSIGNED NULL DEFAULT 0 AFTER `create_time` , | ||
399 | + ADD COLUMN `add_uid` INT(10) UNSIGNED NULL DEFAULT 0 COMMENT '添加人id' AFTER `update_time` , | ||
400 | + ADD COLUMN `add_user_name` VARCHAR(20) COLLATE utf8_general_ci NULL AFTER `add_uid` , | ||
401 | + ADD COLUMN `update_uid` INT(10) UNSIGNED NULL DEFAULT 0 COMMENT '修改人id' AFTER `add_user_name` , | ||
402 | + ADD COLUMN `update_user_name` VARCHAR(20) COLLATE utf8_general_ci NULL AFTER `update_uid`; | ||
403 | + | ||
404 | +ALTER TABLE yh_shops.model_card | ||
405 | + ADD COLUMN `model_id` INT NOT NULL DEFAULT 0 AFTER `model_name`; | ||
406 | + | ||
407 | + ALTER TABLE yh_shops.product_size_reference ADD KEY `union_key` (`product_skn`,`size_id`,`gender`); | ||
408 | + | ||
409 | + | ||
410 | + | ||
411 | + | ||
412 | + -- 店铺装修 | ||
413 | + | ||
414 | + --database erp_supplier | ||
415 | +CREATE TABLE `erp_supplier`.`shops_decorator` ( | ||
416 | + `id` int(11) NOT NULL AUTO_INCREMENT, | ||
417 | + `shops_id` int(11) DEFAULT NULL, | ||
418 | + `check_status` int(11) DEFAULT NULL COMMENT '100 暂存 200 待审核 300 审核通过 900 驳回', | ||
419 | + `create_time` int(11) DEFAULT NULL, | ||
420 | + `update_time` int(11) DEFAULT NULL, | ||
421 | + `status` int(11) DEFAULT NULL, | ||
422 | + PRIMARY KEY (`id`) | ||
423 | +) ENGINE=InnoDB AUTO_INCREMENT=213 DEFAULT CHARSET=utf8 COMMENT='店铺装修'; | ||
424 | + | ||
425 | + | ||
426 | +CREATE TABLE `erp_supplier`.`shops_decorator_comment` ( | ||
427 | + `id` int(11) NOT NULL AUTO_INCREMENT, | ||
428 | + `shops_decorator_id` int(11) DEFAULT NULL, | ||
429 | + `shops_decorator_template_id` int(11) DEFAULT NULL, | ||
430 | + `create_time` int(11) DEFAULT NULL, | ||
431 | + `comment` varchar(100) DEFAULT NULL, | ||
432 | + PRIMARY KEY (`id`) | ||
433 | +) ENGINE=InnoDB AUTO_INCREMENT=75 DEFAULT CHARSET=utf8; | ||
434 | + | ||
435 | + | ||
436 | +DROP TABLE IF EXISTS `erp_supplier`.`shops_decorator_template`; | ||
437 | +CREATE TABLE `erp_supplier`.`shops_decorator_template` ( | ||
438 | + `id` int(11) NOT NULL AUTO_INCREMENT, | ||
439 | + `shops_decorator_id` int(11) NOT NULL, | ||
440 | + `platform` varchar(10) NOT NULL COMMENT '平台(PC,APP)', | ||
441 | + `template_type` varchar(10) DEFAULT '2' COMMENT '模板(1:基础模板,2:经典模板)', | ||
442 | + `create_time` int(11) NOT NULL, | ||
443 | + `update_time` int(11) NOT NULL DEFAULT '0', | ||
444 | + `is_enable` enum('N','Y','') DEFAULT 'Y' COMMENT '是否启用该模板', | ||
445 | + PRIMARY KEY (`id`) | ||
446 | +) ENGINE=InnoDB AUTO_INCREMENT=213 DEFAULT CHARSET=utf8 COMMENT='店铺装修模板'; | ||
447 | + | ||
448 | + | ||
449 | +CREATE TABLE `erp_supplier`.`shops_decorator_template_resource` ( | ||
450 | + `id` int(11) NOT NULL AUTO_INCREMENT, | ||
451 | + `shops_decorator_id` int(11) DEFAULT NULL, | ||
452 | + `shops_decorator_template_id` int(11) DEFAULT NULL, | ||
453 | + `resource_name` varchar(50) DEFAULT NULL, | ||
454 | + `resource_data` text, | ||
455 | + `create_time` int(11) DEFAULT NULL, | ||
456 | + `update_time` int(11) DEFAULT NULL, | ||
457 | + PRIMARY KEY (`id`) | ||
458 | +) ENGINE=InnoDB AUTO_INCREMENT=2905 DEFAULT CHARSET=utf8 COMMENT='店铺装修模板信息'; | ||
459 | + | ||
460 | + | ||
461 | + | ||
462 | +alter table yhb_operations.help_category add column `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1、正常 2、已删除'; | ||
463 | +alter table yhb_operations.help_content add column `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1、正常 2、已删除'; |
-
Please register or login to post a comment