V4.4.sql 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. -- 2020-07-06 10:00
  2. -- 陪玩游戏配置表
  3. ALTER TABLE `friendship`.`play_game_config`
  4. MODIFY COLUMN `status` tinyint(2) NULL DEFAULT 0 COMMENT '状态' AFTER `create_time`;
  5. -- 2020-07-06 10:00
  6. -- 陪玩师注册表
  7. ALTER TABLE `friendship`.`play_user_registered`
  8. ADD COLUMN `service_total_num` int(10) NULL DEFAULT 0 COMMENT '服务人数' AFTER `game_cover`;
  9. ALTER TABLE `friendship`.`play_user_registered`
  10. ADD COLUMN `remark` varchar(128) NULL COMMENT '拒绝理由' AFTER `service_total_num`;
  11. -- 2020-07-06 10:00
  12. -- 陪玩师认证
  13. ALTER TABLE `friendship`.`user`
  14. ADD COLUMN `game_authenticate` tinyint(2) NULL COMMENT '陪玩认证' AFTER `home_img`;
  15. -- 2020-07-07 20:13
  16. ALTER TABLE `friendship`.`play_game_config`
  17. ADD COLUMN `certification_picture_template` varchar(256) NULL COMMENT '技能认证示例图' AFTER `game_cover`;
  18. -- 2020-07-08 19:00
  19. ALTER TABLE `friendship`.`play_game_config`
  20. ADD COLUMN `dictionary_id` bigint(20) NULL COMMENT '技能段位字典id' AFTER `game_name`;
  21. -- 2020-07-08 20:13
  22. -- 修改陪玩订单表
  23. ALTER TABLE `friendship`.`play_orders`
  24. ADD COLUMN `create_time` timestamp(0) NULL COMMENT '订单创建时间' AFTER `status`,
  25. ADD COLUMN `receiving_order_time` timestamp(0) NULL COMMENT '接单时间' AFTER `create_time`,
  26. ADD COLUMN `confirm_service_time` timestamp(0) NULL COMMENT '确认服务时间' AFTER `receiving_order_time`,
  27. ADD COLUMN `start_service_time` timestamp(0) NULL COMMENT '开始服务时间' AFTER `confirm_service_time`,
  28. ADD COLUMN `complete_service_time` timestamp(0) NULL COMMENT '完成服务时间' AFTER `start_service_time`;
  29. ADD COLUMN `cancel_time` timestamp(0) NULL COMMENT '取消订单时间' AFTER `complete_service_time`;
  30. ADD COLUMN `pay_time` timestamp(0) NULL COMMENT '支付时间' AFTER `cancel_time`;
  31. ADD COLUMN `price` int(10) NULL COMMENT '每局的单价' AFTER `pay_time`;
  32. ADD COLUMN `refuse_order_time` timestamp(0) NULL COMMENT '拒绝订单时间' AFTER `price`;
  33. -- 2020-07-09
  34. -- 增加系统配置
  35. INSERT INTO `friendship`.`system_config`(`id`, `name`, `value`, `des`, `create_time`, `update_time`, `sn`)
  36. VALUES (10001024, '陪玩系统抽成', '0.2', '', '2020-07-09 10:50:48', '2020-07-09 10:50:51', 'PWXTCC');
  37. INSERT INTO `friendship`.`system_config`(`id`, `name`, `value`, `des`, `create_time`, `update_time`, `sn`)
  38. VALUES (10001025, '陪玩每局游戏默认的U豆数', '30', NULL, '2020-07-09 16:06:04', '2020-07-09 16:06:06', 'PWMRYXYD');
  39. -- 2020-07-09
  40. -- 话题表增加推荐到首页的状态
  41. ALTER TABLE `friendship`.`topic`
  42. ADD COLUMN `recomand_status` tinyint(2) DEFAULT NULL COMMENT '推荐到首页状态 0:已推荐,未推荐' AFTER `status`;
  43. -- 2020-07-17
  44. -- 动态点赞增加未读消息状态
  45. ALTER TABLE `friendship`.`daily_dynamics_user`
  46. ADD COLUMN `read_status` tinyint(2) NULL COMMENT '是否已读' AFTER `create_time`;
  47. -- 2020-07-17
  48. -- 声卡点赞增加未读消息状态
  49. ALTER TABLE `friendship`.`user_like_miss`
  50. ADD COLUMN `read_status` tinyint(2) NULL COMMENT '是否已读' AFTER `update_time`;
  51. -- 2020-07-20
  52. -- 用户信息表
  53. update user set game_authenticate = 0 where game_authenticate is null;
  54. -- 2020-07-20
  55. -- 系统配置表
  56. INSERT INTO `friendship`.`system_config`(`id`, `name`, `value`, `des`, `create_time`, `update_time`, `sn`)
  57. VALUES (10001026, '陪玩师默认的消息', '你好,需要游戏陪玩的可以直接发消息给我哦,我会尽快给你答复的,暂时不闲聊哈。', NULL, NULL, NULL, 'PWMRXX');
  58. -- 2020-07-20
  59. -- 配置默认审核状态
  60. ALTER TABLE `friendship`.`play_user_registered`
  61. MODIFY COLUMN `service_status` tinyint(2) NULL DEFAULT 0 COMMENT '服务状态(接单中/暂停接单)' AFTER `verify_status`;
  62. -- 作品id 需要先清理数据
  63. ALTER TABLE `friendship`.`user_like_miss`
  64. DROP INDEX `idx_userid_workId`,
  65. ADD UNIQUE INDEX `idx_userid_workId`(`user_id`, `works_id`) USING BTREE;
  66. -- 用户收入表
  67. ALTER TABLE `friendship`.`reward_detail`
  68. CHANGE COLUMN `reward_user_id` `from_user_id` bigint(20) NULL DEFAULT NULL COMMENT '打赏/下单的用户id' AFTER `id`,
  69. CHANGE COLUMN `receive_reward_user_id` `to_user_id` bigint(20) NULL DEFAULT NULL COMMENT '收到收入的用户id' AFTER `from_user_id`,
  70. ADD COLUMN `type` tinyint(2) NULL COMMENT '收入类型' AFTER `receive_total_sugar`,
  71. ADD COLUMN `des` varchar(16) NULL COMMENT '收入说明' AFTER `type`;
  72. MODIFY COLUMN `type` tinyint(2) NULL DEFAULT 0 COMMENT '收入类型' AFTER `receive_total_sugar`;
  73. ALTER TABLE reward_detail RENAME TO user_income_detail;
  74. update user_income_detail set type = 1,des = '游戏陪玩收入' where gift_name is null;
  75. update user_income_detail set type = 0,des = '礼物打赏收入' where gift_name is not null;
  76. -- 2020-07-25
  77. -- 陪玩订单表
  78. ALTER TABLE `friendship`.`play_orders`
  79. ADD COLUMN `sugar` double(10, 2) NULL COMMENT 'Q糖' AFTER `refuse_order_time`,
  80. ADD COLUMN `money` double(10, 2) NULL COMMENT '对应的金额' AFTER `sugar`;
  81. -- 2020-07-27
  82. -- 陪玩图片形象卡
  83. ALTER TABLE `friendship`.`play_user_image_card_pictures`
  84. ADD COLUMN `is_fill` tinyint(2) NULL COMMENT '是否拉伸' AFTER `update_time`,
  85. ADD COLUMN `new_picture_src` varchar(300) NULL COMMENT '最新上传的图片url' AFTER `is_fill`;
  86. ADD COLUMN `new_picture_src_is_fill` tinyint(2) NULL COMMENT '新上传的图片是否需要拉伸' AFTER `new_picture_src`;
  87. -- 2020-07-27
  88. -- 陪玩视频形象卡
  89. ALTER TABLE `friendship`.`play_user_image_card_video`
  90. ADD COLUMN `is_fill` tinyint(2) NULL COMMENT '是否拉伸' AFTER `update_time`,
  91. ADD COLUMN `new_video_src` varchar(300) NULL COMMENT '新的视频url' AFTER `is_fill`,
  92. ADD COLUMN `new_video_cover_src` varchar(300) NULL COMMENT '新的视频的封面' AFTER `new_video_src`;
  93. ADD COLUMN `new_video_is_fill` tinyint(2) NULL COMMENT '新的视频是否需要拉伸' AFTER `new_video_cover_src`;
  94. update `friendship`.`system_config` set `value` = '150',`update_time` = '2020-07-27 11:51:20' where id = '10001025';
  95. INSERT INTO `friendship`.`system_config`(`id`, `name`, `value`, `des`, `create_time`, `update_time`, `sn`)
  96. VALUES (10001027, '陪玩价格推荐价格', '150,300,500','价格之间用逗号隔开', NULL, NULL, 'PWTJXX');
  97. -- 游戏技能配置增加计费方式
  98. ALTER TABLE `friendship`.`play_game_config`
  99. ADD COLUMN `billing_way` tinyint(2) NULL COMMENT '计费方式' AFTER `status`;
  100. -- 更新收入表
  101. update user_income_detail set type = 0,des = '礼物打赏收入' where type is null;
  102. -- 陪玩图片形象卡
  103. ALTER TABLE `friendship`.`play_user_image_card_pictures`
  104. MODIFY COLUMN `is_fill` tinyint(2) NULL DEFAULT 0 COMMENT '是否拉伸' AFTER `update_time`;
  105. -- 陪玩形象卡推荐表
  106. ALTER TABLE `friendship`.`play_image_card_recommend`
  107. ADD COLUMN `is_fill_status` varchar(20) NULL COMMENT '拉伸状态' AFTER `des`;
  108. -- 陪玩视频形象卡
  109. ALTER TABLE `friendship`.`play_user_image_card_video`
  110. MODIFY COLUMN `is_fill` tinyint(2) NULL DEFAULT 0 COMMENT '是否拉伸' AFTER `update_time`;
  111. MODIFY COLUMN `new_video_is_fill` tinyint(2) NULL DEFAULT 0 COMMENT '新的视频是否需要拉伸' AFTER `new_video_cover_src`;
  112. -- 交友形象卡图片
  113. ALTER TABLE `friendship`.`user_image_card_pictures`
  114. ADD COLUMN `is_fill` tinyint(2) NULL COMMENT '是否拉伸' AFTER `update_time`;
  115. MODIFY COLUMN `is_fill` tinyint(2) NULL DEFAULT 0 COMMENT '是否拉伸' AFTER `update_time`;
  116. -- 交友形象卡视频
  117. ALTER TABLE `friendship`.`user_image_card_video`
  118. ADD COLUMN `is_fill` tinyint(2) NULL DEFAULT 0 COMMENT '是否拉伸' AFTER `update_time`;
  119. -- 形象卡推荐表
  120. ALTER TABLE `friendship`.`image_card_recommand`
  121. ADD COLUMN `is_fill` varchar(16) NULL COMMENT '推荐的拉伸状态' AFTER `logic_delete`;
  122. -- 直播间
  123. ALTER TABLE `friendship`.`live_room`
  124. ADD UNIQUE INDEX `idx_userId`(`user_id`) USING BTREE COMMENT '用户id唯一索引';
  125. ALTER TABLE `friendship`.`live_room`
  126. ADD COLUMN `message_id` varchar(32) NOT NULL COMMENT '消息id' AFTER `create_time`;
  127. ALTER TABLE `friendship`.`live_room`
  128. ADD COLUMN `tag_id` varchar(32) NULL COMMENT '房间标签' AFTER `message_id`;
  129. ALTER TABLE `friendship`.`live_room`
  130. ADD COLUMN `type` tinyint(2) NULL COMMENT '房间类型' AFTER `tag_id`;
  131. ALTER TABLE `friendship`.`live_room`
  132. CHANGE COLUMN `create_time` `live_room_create_time` timestamp(0) NULL DEFAULT NULL COMMENT '创建时间' AFTER `live_status`,
  133. ADD COLUMN `live_room_close_time` timestamp(0) NULL COMMENT '直播间关闭时间' AFTER `type`;
  134. ADD COLUMN `live_room_close_time` timestamp(0) NULL COMMENT '直播间关闭时间' AFTER `type`;
  135. ALTER TABLE `friendship`.`live_room`
  136. ADD COLUMN `accompany_chat_chat_sec` int(10) NULL COMMENT '陪聊房间陪聊时长设置' AFTER `live_room_close_time`,
  137. ADD COLUMN `accompany_chat_gold_num` bigint(10) NULL COMMENT '陪聊金币' AFTER `accompany_chat_chat_sec`,
  138. ADD COLUMN `back_pic_url` varchar(255) NULL COMMENT '背景图' AFTER `accompany_chat_gold_num`;
  139. -- 修改group表名
  140. ALTER TABLE `friendship`.`group`
  141. RENAME TO `topic_group`;
  142. -- 账户详情表
  143. ALTER TABLE `friendship`.`user_account_detail`
  144. ADD COLUMN `to_user_id` bigint(20) NULL COMMENT '收到收入的用户id' AFTER `user_id`,
  145. ADD COLUMN `gift_id` bigint(20) NULL COMMENT '礼物id' AFTER `to_user_id`,
  146. ADD COLUMN `type` tinyint(2) NULL COMMENT '类型' AFTER `des`;