多租户商城-后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
2.9 KiB

2 years ago
  1. alter table cere_platform_user
  2. add column `avatar` varchar(256) DEFAULT NULL COMMENT '头像' after `email`;
  3. create table cere_buyer_track_report
  4. (
  5. id bigint(20) not null auto_increment,
  6. event_type int(11) not null default 1 comment '事件类型 1-商品详情页访问5s, 2-添加到购物车, 3-提交订单',
  7. product_ids varchar(4096) default null comment '商品id列表, 用,分割',
  8. create_time varchar(20) not null comment '创建时间',
  9. create_user bigint(20) not null comment '创建人id',
  10. primary key (`id`),
  11. key idx_create_user (`create_user`)
  12. ) comment '用户埋点上报';
  13. alter table cere_shop_order
  14. add column `old_price` decimal(15,2) DEFAULT NULL COMMENT '改价前的支付金额' after `price`;
  15. alter table cere_buyer_user
  16. add column `terminal` int(11) not null default 0 comment '终端 1-APP 2-微信小程序 3-H5 4-支付宝小程序 5-PC' after `credit`;
  17. create table cere_product_stats_by_day
  18. (
  19. create_date char(10) not null comment '日期',
  20. product_id bigint(20) not null comment '商品id',
  21. shop_id bigint(20) not null comment '店铺id',
  22. add_cart_count int(11) not null default 0 comment '加购量',
  23. visit_count int(11) not null default 0 comment '访问量',
  24. sales_volume int(11) not null default 0 comment '销量',
  25. primary key (`create_date`, `product_id`),
  26. key idx_product_id (`product_id`),
  27. key idx_shop_id (`shop_id`)
  28. ) comment '商品日度统计表';
  29. ALTER TABLE `cere_buyer_comment_like`
  30. ADD PRIMARY KEY (`comment_id`, `buyer_user_id`);
  31. ALTER TABLE `cere_order_product`
  32. ADD COLUMN `actual_price` decimal(15, 6) NOT NULL DEFAULT 0 COMMENT '该sku实际总支付价格,不算运费和积分' AFTER `product_price`;
  33. ALTER TABLE `cere_sign_product`
  34. ADD INDEX `idx_sign_id`(`sign_id`) USING BTREE,
  35. ADD INDEX `idx_productt_id`(`product_id`) USING BTREE;
  36. ALTER TABLE `cere_buyer_coupon`
  37. ADD COLUMN `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id' FIRST,
  38. ADD PRIMARY KEY (`id`);
  39. ALTER TABLE `cere_shop_coupon`
  40. ADD INDEX `idx_shop_id`(`shop_id`) USING BTREE;
  41. create table cere_shop_customer_service
  42. (
  43. `id` bigint(20) not null auto_increment comment '主键id',
  44. `shop_id` bigint(20) not null comment '店铺id',
  45. `open_kfid` varchar(64) not null comment '客服id',
  46. `create_time` varchar(20) DEFAULT NULL COMMENT '创建时间',
  47. `update_time` varchar(20) DEFAULT NULL COMMENT '更新时间',
  48. primary key (`id`),
  49. key idx_shop_id(`shop_id`)
  50. ) comment '店铺客服关联表';
  51. ALTER TABLE `cere_shop_distribution_level`
  52. ADD COLUMN `level_logo` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '等级图标' AFTER `level_num`;
  53. ALTER TABLE `cere_logistics_charge` MODIFY COLUMN `region` text NOT NULL COMMENT '配送区域 省-市' AFTER `logistics_id`;
  54. ALTER TABLE `cere_order_product` MODIFY COLUMN `logistics_price` decimal(15, 4) NOT NULL DEFAULT 0.0000 COMMENT '运费' AFTER `use_credit_amount`;