perf: 修改sql升级语句,兼容mysql5.7

This commit is contained in:
xiaojunnuo
2026-02-09 18:18:19 +08:00
parent d286c040a5
commit 02f89a9c9d
11 changed files with 60 additions and 14 deletions
@@ -1,5 +1,5 @@
CREATE TABLE `cd_oauth_bound`
CREATE TABLE IF NOT EXISTS `cd_oauth_bound`
(
`id` bigint PRIMARY KEY AUTO_INCREMENT NOT NULL,
`user_id` bigint NOT NULL,
@@ -7,8 +7,8 @@ CREATE TABLE `cd_oauth_bound`
`open_id` varchar(512) NOT NULL,
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
);
) ENGINE=InnoDB;
CREATE INDEX `index_oauth_bound_user_id` ON `cd_oauth_bound` (`user_id`);
CREATE INDEX `index_oauth_bound_open_id` ON `cd_oauth_bound` (`open_id`);
CREATE INDEX `index_oauth_bound_open_id` ON `cd_oauth_bound` (`open_id`(190));