V1.1.sql 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. ALTER TABLE `toktok_stores`.`user_focus` AUTO_INCREMENT = 12869323;
  2. ALTER TABLE `toktok_stores`.`user_focus`
  3. ADD UNIQUE INDEX `user_focus_user_index`(`user_id`, `focus_user_id`);
  4. ALTER TABLE `toktok_stores`.`beer_blind_box`
  5. DROP COLUMN `box_no`,
  6. DROP COLUMN `title`,
  7. DROP COLUMN `details`,
  8. DROP COLUMN `beer_ids`,
  9. ADD COLUMN `sub_id` bigint(20) NOT NULL COMMENT '主题id' AFTER `blind_box_id`,
  10. MODIFY COLUMN `box_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '盲盒名' AFTER `blind_box_id`,
  11. MODIFY COLUMN `cut_off_time` int(0) NOT NULL COMMENT '截止日期(<=28)' AFTER `box_name`;
  12. ALTER TABLE `toktok_stores`.`beer_blind_box`
  13. ADD COLUMN `sort` int(10) NOT NULL DEFAULT 0 COMMENT '排序' AFTER `status`;
  14. ALTER TABLE `toktok_stores`.`price_manager`
  15. ADD COLUMN `default_price` tinyint(3) NOT NULL DEFAULT 0 COMMENT '是否为默认价格' AFTER `price`;
  16. ALTER TABLE `toktok_stores`.`beer_blind_box_detail`
  17. CHANGE COLUMN `beer_ids` `sku_ids` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '盲盒内的商品id列表,多个之间用;分隔' AFTER `details`;
  18. ALTER TABLE `toktok_stores`.`trade_order`
  19. ADD COLUMN `num` int(0) NOT NULL DEFAULT 1 COMMENT '订单商品数量' AFTER `out_id`;
  20. ALTER TABLE `toktok_stores`.`beer_box_order`
  21. ADD COLUMN `price` int(10) NOT NULL DEFAULT 0 COMMENT '单个商品价格(分)' AFTER `num`;
  22. ALTER TABLE `toktok_stores`.`beer_box_order`
  23. ADD COLUMN `order_no` varchar(64) NOT NULL COMMENT '订单号' AFTER `box_no`;
  24. ALTER TABLE `toktok_stores`.`beer_blind_box`
  25. ADD COLUMN `curr_box_no` varchar(64) NOT NULL DEFAULT '' COMMENT '当前盲盒期数' AFTER `gmt_modified`;
  26. ALTER TABLE `toktok_stores`.`user_address`
  27. ADD COLUMN `status` tinyint(3) NOT NULL DEFAULT 1 COMMENT '状态' AFTER `is_default`;
  28. ALTER TABLE `toktok_stores`.`user_address`
  29. CHANGE COLUMN `is_default` `default_address` tinyint(3) NOT NULL DEFAULT 0 COMMENT '是否默认' AFTER `detail_address`;
  30. ALTER TABLE `toktok_stores`.`user_address`
  31. MODIFY COLUMN `update_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) AFTER `create_time`;
  32. ALTER TABLE `toktok_stores`.`beer_box_order`
  33. MODIFY COLUMN `gmt_modified` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间' AFTER `gmt_create`;
  34. INSERT INTO `toktok_stores`.`sys_config`( `name`, `value`, `des`, `create_time`, `update_time`) VALUES ( 'district_controller', '202305231049', '地区版本', '2023-05-23 10:49:40', NULL);
  35. ALTER TABLE `toktok_stores`.`beer_blind_box_detail`
  36. ADD COLUMN `des` varchar(255) NULL COMMENT '订阅说明,多个之间用;分隔' AFTER `details`;
  37. ALTER TABLE `toktok_stores`.`beer_box_order`
  38. CHANGE COLUMN `addrress` `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '收货人地址' AFTER `phone`,
  39. ADD COLUMN `user_address_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '收货地址id' AFTER `phone`;
  40. ALTER TABLE `toktok_stores`.`beer_blind_box`
  41. ADD COLUMN `box_detail_id` bigint(20) UNSIGNED NOT NULL COMMENT '盲盒详情id' AFTER `curr_box_no`;
  42. ALTER TABLE `toktok_stores`.`subject`
  43. ADD COLUMN `sub_logo` varchar(255) NOT NULL COMMENT '主题logo' AFTER `detail_bg`;
  44. ALTER TABLE `toktok_stores`.`beer_box_order_split`
  45. ADD COLUMN `box_name` varchar(64) NOT NULL DEFAULT '' COMMENT '盲盒名称' AFTER `status`,
  46. ADD COLUMN `cut_off_time` datetime(0) NULL COMMENT '盲盒截止时间' AFTER `month`;
  47. ALTER TABLE `toktok_stores`.`beer_box_node_log`
  48. ADD COLUMN `bbos_id` bigint(20) NOT NULL COMMENT 'box_order_split_id' AFTER `beer_box_node_log_id`;
  49. ALTER TABLE `toktok_stores`.`beer_box_order_split`
  50. CHANGE COLUMN `box_order_split_id` `bbos_id` bigint(20) NOT NULL AUTO_INCREMENT FIRST,
  51. DROP PRIMARY KEY,
  52. ADD PRIMARY KEY (`bbos_id`) USING BTREE;
  53. ALTER TABLE `toktok_stores`.`account_third_wechat`
  54. ADD UNIQUE INDEX `account_id_index`(`account_id`);
  55. ALTER TABLE `toktok_stores`.`message`
  56. ADD COLUMN `status` tinyint(3) NOT NULL DEFAULT 0 COMMENT '状态,0未读,1已读' AFTER `jump_path`;
  57. ALTER TABLE `toktok_stores`.`account_third_wechat`
  58. DROP INDEX `account_id_index`,
  59. ADD INDEX `account_id_index`(`account_id`) USING BTREE;
  60. ALTER TABLE `toktok_stores`.`account_third_wechat`
  61. ADD UNIQUE INDEX `account_id_and_type_index`(`account_id`, `type`) USING BTREE;
  62. ALTER TABLE `toktok_stores`.`beer_box_order_split`
  63. ADD COLUMN `consignee` varchar(40) NOT NULL DEFAULT '' COMMENT '收货人' AFTER `sku_id`,
  64. ADD COLUMN `phone` varchar(40) NOT NULL DEFAULT '' COMMENT '收货人联系电话' AFTER `consignee`;
  65. ALTER TABLE `toktok_stores`.`beer_blind_box`
  66. ADD COLUMN `loop_type` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '盲盒活动循环类型' AFTER `sub_id`;
  67. ALTER TABLE `toktok_stores`.`account_third_wechat`
  68. DROP INDEX `unionId_index`,
  69. ADD INDEX `unionId_index`(`unionid`) USING BTREE;
  70. ALTER TABLE `toktok_stores`.`beer_box_order_split`
  71. ADD COLUMN `update_address_flag` tinyint(3) NOT NULL DEFAULT 0 COMMENT '更改收货地址开关' AFTER `address`;
  72. ALTER TABLE `toktok_stores`.`trade_order`
  73. ADD UNIQUE INDEX `order_no_index`(`order_no`) COMMENT 'order_no唯一索引';