From b2c4158375490c2d3e2a614e90488f3f2c686e77 Mon Sep 17 00:00:00 2001 From: tanghao Date: Tue, 22 Feb 2022 10:01:53 +0800 Subject: fix: 降低flyway版本 防止后续升级sql缺失 升级前需先执行文件中的update语句再启动项目 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/db/V2021.12.07.1__endpoint add index.sql | 14 ++++++++++++++ .../main/resources/db/V2022.02.15__endpoint add index.sql | 13 ------------- 2 files changed, 14 insertions(+), 13 deletions(-) create mode 100644 nz-admin/src/main/resources/db/V2021.12.07.1__endpoint add index.sql delete mode 100644 nz-admin/src/main/resources/db/V2022.02.15__endpoint add index.sql diff --git a/nz-admin/src/main/resources/db/V2021.12.07.1__endpoint add index.sql b/nz-admin/src/main/resources/db/V2021.12.07.1__endpoint add index.sql new file mode 100644 index 00000000..a2b79a9c --- /dev/null +++ b/nz-admin/src/main/resources/db/V2021.12.07.1__endpoint add index.sql @@ -0,0 +1,14 @@ +/** + * + * 优化endpoint列表查询 缺失索引表添加索引 + * update flyway_schema_history set version = '2021.12.07.1',script = 'V2021.12.07.1__endpoint add index.sql' where version ='2022.02.15' + * + **/ + +ALTER TABLE `monitor_endpoint_config` +ADD INDEX `idx_endpoint_id`(`endpoint_id`) USING BTREE; + +ALTER TABLE `monitor_endpoint_state` +ADD INDEX `idx_endpoint_id`(`endpoint_id`) USING BTREE, +ADD INDEX `idx_config_id`(`config_id`) USING BTREE; + diff --git a/nz-admin/src/main/resources/db/V2022.02.15__endpoint add index.sql b/nz-admin/src/main/resources/db/V2022.02.15__endpoint add index.sql deleted file mode 100644 index f8ad9e0d..00000000 --- a/nz-admin/src/main/resources/db/V2022.02.15__endpoint add index.sql +++ /dev/null @@ -1,13 +0,0 @@ -/** - * - * 优化endpoint列表查询 缺失索引表添加索引 - * - **/ - -ALTER TABLE `monitor_endpoint_config` -ADD INDEX `idx_endpoint_id`(`endpoint_id`) USING BTREE; - -ALTER TABLE `monitor_endpoint_state` -ADD INDEX `idx_endpoint_id`(`endpoint_id`) USING BTREE, -ADD INDEX `idx_config_id`(`config_id`) USING BTREE; - -- cgit v1.2.3