sql_log.sql 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. -- 表注释
  2. alter table eb_store_coupon_issue comment '优惠券前台领取表';
  3. alter table eb_store_coupon_issue_user comment '优惠券前台用户领取记录表';
  4. alter table eb_store_pink comment '拼团表';
  5. alter table eb_user_notice_see comment '用户通知发送记录表';
  6. alter table eb_user_extract comment '用户提现表';
  7. alter table eb_user_group comment '用户分组表';
  8. alter table eb_user_recharge comment '用户充值表';
  9. alter table eb_user_notice comment '用户通知表';
  10. alter table eb_store_visit comment '产品浏览分析表';
  11. -- --产品浏览分析表表 字段
  12. alter table eb_store_visit modify column product_id int(11) comment '产品ID';
  13. alter table eb_store_visit modify column cate_id int(11) comment '产品分类ID';
  14. alter table eb_store_visit modify column type char(50) comment '产品类型';
  15. alter table eb_store_visit modify column uid int(11) comment '用户ID';
  16. alter table eb_store_visit modify column count int(11) comment '访问次数';
  17. alter table eb_store_visit modify column content varchar(255) comment '备注描述';
  18. alter table eb_store_visit modify column add_time int(11) comment '添加时间';
  19. --
  20. -- 字段注释
  21. -- 缓存表 字段
  22. -- alter table eb_cache modify column key varchar(32) comment '缓存key唯一值';
  23. alter table eb_cache modify column result text comment '缓存数据';
  24. alter table eb_cache modify column add_time int(10) comment '缓存时间';
  25. -- --优惠券前台领取表 字段
  26. alter table eb_store_coupon_issue modify column cid int(10) comment '优惠券ID';
  27. alter table eb_store_coupon_issue modify column start_time int(10) comment '优惠券领取开启时间';
  28. alter table eb_store_coupon_issue modify column end_time int(10) comment '优惠券领取结束时间';
  29. alter table eb_store_coupon_issue modify column total_count int(10) comment '优惠券领取数量';
  30. alter table eb_store_coupon_issue modify column remain_count int(10) comment '优惠券剩余领取数量';
  31. alter table eb_store_coupon_issue modify column add_time int(10) comment '优惠券添加时间';
  32. -- 优惠券前台用户领取记录表 字段
  33. alter table eb_store_coupon_issue_user modify column uid int(10) comment '领取优惠券用户ID';
  34. alter table eb_store_coupon_issue_user modify column issue_coupon_id int(10) comment '优惠券前台领取ID';
  35. alter table eb_store_coupon_issue_user modify column add_time int(10) comment '领取时间';
  36. -- --用户分组表 字段
  37. alter table eb_user_group modify column group_name varchar(64) comment '用户分组名称';
  38. -- --用户充值表 字段
  39. alter table eb_user_recharge modify column uid int(10) comment '充值用户UID';
  40. alter table eb_user_recharge modify column order_id varchar(32) comment '订单号';
  41. alter table eb_user_recharge modify column price decimal(8,2) comment '充值金额';
  42. alter table eb_user_recharge modify column recharge_type varchar(32) comment '充值类型';
  43. alter table eb_user_recharge modify column paid tinyint(1) comment '是否充值';
  44. alter table eb_user_recharge modify column pay_time int(10) comment '充值支付时间';
  45. alter table eb_user_recharge modify column add_time int(12) comment '充值时间';
  46. -- --添加配置类型
  47. ALTER TABLE `eb_system_config_tab` ADD `type` INT(2) NULL DEFAULT '0' COMMENT '配置类型' AFTER `icon`;
  48. -- --添加小程序openid
  49. ALTER TABLE `eb_wechat_user` ADD `routine_openid` varchar(32) NULL DEFAULT '' COMMENT '小程序唯一身份ID' AFTER `openid`;
  50. -- --添加微信openid 允许为空
  51. ALTER TABLE `eb_wechat_user` CHANGE `openid` `openid` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '用户的标识,对当前公众号唯一';
  52. -- --添加附件记录表 允许为空
  53. DROP TABLE IF EXISTS `eb_system_attachment`;
  54. CREATE TABLE `eb_system_attachment` (
  55. `att_id` int(11) NOT NULL AUTO_INCREMENT,
  56. `name` varchar(100) NOT NULL COMMENT '附件名称',
  57. `att_dir` varchar(200) NOT NULL COMMENT '附件路径',
  58. `satt_dir` varchar(200) NOT NULL COMMENT '附件压缩路径',
  59. `att_size` char(30) NOT NULL COMMENT '附件大小',
  60. `att_type` char(30) NOT NULL COMMENT '附件类型',
  61. `pid` int(10) NOT NULL COMMENT '分类ID0编辑器,1产品图片,2拼团图片,3砍价图片,4秒杀图片,5文章图片,6组合数据图',
  62. `time` int(11) NOT NULL COMMENT '上传时间',
  63. PRIMARY KEY (`att_id`)
  64. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='附件管理表';
  65. SET FOREIGN_KEY_CHECKS = 1;
  66. -- --修改文章表名称
  67. ALTER TABLE eb_wechat_news RENAME TO eb_article
  68. -- --修改文章内容表名称
  69. ALTER TABLE eb_wechat_news_content RENAME TO eb_article_content
  70. -- 文章表 添加 is_hot字段和is_banner字段
  71. alter table eb_article modify column is_hot tinyint(1) comment '是否热门(小程序)';
  72. alter table eb_article modify column is_banner tinyint(1) comment '是否轮播图(小程序)';
  73. -- 砍价产品表 添加 is_hot字段和is_banner字段
  74. alter table eb_store_bargain modify column look int(11) comment '砍价产品浏览量';
  75. alter table eb_store_bargain modify column share int(11) comment '砍价成品分享次数';
  76. -- --添加小程序模板消息表 允许为空
  77. DROP TABLE IF EXISTS `eb_routine_template`;
  78. CREATE TABLE `eb_routine_template` (
  79. `id` int(11) NOT NULL AUTO_INCREMENT,
  80. `tempkey` char(50) NOT NULL COMMENT '模板编号',
  81. `name` char(100) NOT NULL COMMENT '模板名',
  82. `content` varchar(1000) NOT NULL COMMENT '回复内容',
  83. `tempid` char(100) NOT NULL COMMENT '模板ID',
  84. `add_time` varchar(15) NOT NULL COMMENT '添加时间',
  85. `status` tinyint(4) NOT NULL COMMENT '模板状态',
  86. PRIMARY KEY (`id`)
  87. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='小程序模板消息表';
  88. SET FOREIGN_KEY_CHECKS = 1;
  89. -- --修改优惠劵领取为负数,还可以领
  90. ALTER TABLE `eb_store_coupon_issue` ADD `is_permanent` TINYINT(1) NOT NULL DEFAULT '0' COMMENT '是否无限张数' AFTER `remain_count`;
  91. -- 订单表 添加 is_channel字段
  92. alter table eb_store_order modify column is_channel tinyint(1) comment '支付渠道(0微信公众号1微信小程序)';
  93. -- 客服通知
  94. ALTER TABLE `eb_store_service` ADD `notify` INT(2) NULL DEFAULT '0' COMMENT '订单通知1开启0关闭' AFTER `status`;