From 4cdff4ab1b9beb02be0c1cd0a516c022072d765d Mon Sep 17 00:00:00 2001 From: lan-yonghui Date: Thu, 6 Apr 2023 11:39:48 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=96=B0=E6=89=8B=E4=BB=BB=E5=8A=A1):=20Op?= =?UTF-8?q?timize=20SQL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/2.8.1/ddl/V136__add_novice_statistics.sql | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/system-setting/backend/src/main/resources/db/migration/2.8.1/ddl/V136__add_novice_statistics.sql b/system-setting/backend/src/main/resources/db/migration/2.8.1/ddl/V136__add_novice_statistics.sql index f5c4f220f2..f29fcd9126 100644 --- a/system-setting/backend/src/main/resources/db/migration/2.8.1/ddl/V136__add_novice_statistics.sql +++ b/system-setting/backend/src/main/resources/db/migration/2.8.1/ddl/V136__add_novice_statistics.sql @@ -1,7 +1,6 @@ SET SESSION innodb_lock_wait_timeout = 7200; -CREATE TABLE `novice_statistics` -( +CREATE TABLE IF NOT EXISTS `novice_statistics` ( `id` varchar(50) NOT NULL COMMENT 'ID', `user_id` varchar(64) NOT NULL COMMENT '用户id', `guide_step` tinyint NOT NULL DEFAULT '0' COMMENT '新手引导完成的步骤', @@ -9,7 +8,6 @@ CREATE TABLE `novice_statistics` `data_option` longtext DEFAULT NULL COMMENT 'data option (JSON format)', `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', - PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4