-- 2020-10-13 用户权限表 ALTER TABLE `friendship`.`user_permissions` ADD COLUMN `create_image_card` tinyint(2) NULL DEFAULT 0 COMMENT '创建形象卡' AFTER `live_room`, ADD COLUMN `like_user` tinyint(2) NULL DEFAULT 0 COMMENT '喜欢用户' AFTER `create_image_card`; -- 2020-10-14 ALTER TABLE `friendship`.`user_permissions` CHANGE COLUMN `userId` `user_id` bigint(20) NOT NULL COMMENT '用户id' AFTER `id`, ADD UNIQUE INDEX `user_id_index`(`user_id`) USING BTREE COMMENT '用户id唯一索引'; ALTER TABLE `friendship`.`report_and_appeal` ADD COLUMN `been_report_user_id` bigint(20) NULL COMMENT '被举报人id' AFTER `report_user_id`; -- 2020-10-15 ALTER TABLE `friendship`.`report_and_appeal` DROP COLUMN `appeal_img_urls`, DROP COLUMN `appeal_des`, DROP COLUMN `appeal_time`, DROP COLUMN `appeal_status`, DROP COLUMN `appeal_count`, ADD COLUMN `timestamp` bigint(20) NULL COMMENT '时间戳' AFTER `report_status`; ALTER TABLE `friendship`.`report_and_appeal_history` CHANGE COLUMN `report_id` `report_or_appeal_id` bigint(20) NULL DEFAULT NULL COMMENT '举报时间戳或申诉id' AFTER `id`; ALTER TABLE `friendship`.`report_and_appeal` ADD COLUMN `deanid_des` varchar(255) NULL COMMENT '拒绝理由' AFTER `timestamp` ADD COLUMN `appeal_status` tinyint(2) NULL COMMENT '是否需要申诉,用于标记申诉完成状态' AFTER `deanid_des`; ALTER TABLE `friendship`.`appeal` MODIFY COLUMN `appeal_time` timestamp(0) NULL DEFAULT NULL COMMENT '申诉时间' AFTER `appeal_user_id`, ADD COLUMN `update_time` timestamp(0) NULL COMMENT '审核时间' AFTER `appeal_count`, ADD COLUMN `deanid_des` varchar(255) NULL COMMENT '拒绝理由' AFTER `update_time`; ALTER TABLE `friendship`.`report_and_appeal_history` ADD COLUMN `history_type` tinyint(2) NULL COMMENT '历史记录类型' AFTER `des`;