USE `pool`

-- 挖矿用户表及对应的收款信息表 新增修改时间
ALTER TABLE user_miner_account ADD COLUMN `update_time` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间';
ALTER TABLE user_account_balance ADD COLUMN `update_time` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间';


CREATE TABLE `ticket_temporary` (
                          `id` bigint NOT NULL AUTO_INCREMENT,
                          `email` varchar(320) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '联系邮箱',
                          `desc` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT '问题描述',
                          `create_time` datetime NOT NULL COMMENT '创建时间',
                          `status` int NOT NULL DEFAULT '0' COMMENT '工单状态',
                          `update_time` datetime DEFAULT NULL COMMENT '更新日期',
                          PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb3 ROW_FORMAT=COMPACT COMMENT='工单---删除临时存储表';


CREATE TABLE `ticket_supplement_temporary` (
                                     `id` bigint NOT NULL AUTO_INCREMENT,
                                     `ticket_id` bigint NOT NULL,
                                     `content` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '',
                                     `files` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
                                     `video_file` varchar(360) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
                                     `image_file` varchar(360) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
                                     `audio_file` varchar(360) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
                                     `create_time` datetime DEFAULT NULL,
                                     PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb3 ROW_FORMAT=COMPACT COMMENT='工单补充内容---删除临时存储表';


CREATE TABLE `user_page_info_temporary` (
                                  `id` int NOT NULL AUTO_INCREMENT,
                                  `user` varchar(200) NOT NULL,
                                  `account` varchar(30) NOT NULL,
                                  `coin` varchar(30) NOT NULL,
                                  `url_key` varchar(80) NOT NULL,
                                  `config` varchar(50) NOT NULL,
                                  `remark` varchar(200) DEFAULT NULL,
                                  `create_time` datetime NOT NULL,
                                  `update_time` datetime DEFAULT NULL,
                                  `lang` varchar(2) DEFAULT 'zh',
                                  PRIMARY KEY (`id`),
                                  UNIQUE KEY `url_key` (`url_key`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb3 COMMENT='用户只读页面---删除临时存储表';


CREATE TABLE `user_api_temporary` (
                            `id` bigint NOT NULL AUTO_INCREMENT,
                            `user` varchar(280) NOT NULL COMMENT '网站用户名，即邮箱',
                            `api_key` varchar(350) NOT NULL COMMENT 'api_key',
                            `api_ip` varchar(150) NOT NULL COMMENT '绑定ip',
                            `perms` varchar(50) NOT NULL COMMENT '权限',
                            PRIMARY KEY (`id`),
                            UNIQUE KEY `api_key` (`api_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='用户API---删除临时存储表';
