From cb845e0904863ef77e90b7b0718d67d3f41fca4e Mon Sep 17 00:00:00 2001 From: JiaJu Zhuang <5152853@qq.com> Date: Sat, 2 Sep 2023 16:13:01 +0800 Subject: [PATCH] Complete team additions, deletions, modifications, and checks --- .../V2_1_0__支持环境、用户权限.sql | 18 +++++++++++ .../main/resources/db/temp/V2_1_0__补充.sql | 32 +++++++++---------- 2 files changed, 34 insertions(+), 16 deletions(-) diff --git a/chat2db-server/chat2db-server-start/src/main/resources/db/migration/V2_1_0__支持环境、用户权限.sql b/chat2db-server/chat2db-server-start/src/main/resources/db/migration/V2_1_0__支持环境、用户权限.sql index 1a24e073..65380506 100644 --- a/chat2db-server/chat2db-server-start/src/main/resources/db/migration/V2_1_0__支持环境、用户权限.sql +++ b/chat2db-server/chat2db-server-start/src/main/resources/db/migration/V2_1_0__支持环境、用户权限.sql @@ -107,3 +107,21 @@ CREATE TABLE IF NOT EXISTS `data_source_access` create INDEX idx_data_source_access_data_source_id on data_source_access (`data_source_id`); create INDEX idx_data_source_access_access_object_id on data_source_access (`access_object_type`, `access_object_id`); create UNIQUE INDEX uk_data_source_access on data_source_access (`data_source_id`,`access_object_type`, `access_object_id`); + +ALTER TABLE `operation_saved` + modify COLUMN `user_id` bigint(20) unsigned NOT NULL DEFAULT 1 COMMENT '用户id'; + +update operation_saved +set user_id= 1; + +ALTER TABLE `dashboard` + modify `user_id` bigint(20) unsigned NOT NULL DEFAULT 1 COMMENT '用户id'; +update dashboard +set user_id= 1; + + +ALTER TABLE `chart` + modify `user_id` bigint(20) unsigned NOT NULL DEFAULT 1 COMMENT '用户id'; +update chart +set user_id= 1; + diff --git a/chat2db-server/chat2db-server-start/src/main/resources/db/temp/V2_1_0__补充.sql b/chat2db-server/chat2db-server-start/src/main/resources/db/temp/V2_1_0__补充.sql index d7db80e5..8aeedb33 100644 --- a/chat2db-server/chat2db-server-start/src/main/resources/db/temp/V2_1_0__补充.sql +++ b/chat2db-server/chat2db-server-start/src/main/resources/db/temp/V2_1_0__补充.sql @@ -1,16 +1,16 @@ -ALTER TABLE `operation_saved` - modify COLUMN `user_id` bigint(20) unsigned NOT NULL DEFAULT 1 COMMENT '用户id'; - -update operation_saved -set user_id= 1; - -ALTER TABLE `dashboard` - modify `user_id` bigint(20) unsigned NOT NULL DEFAULT 1 COMMENT '用户id'; -update dashboard -set user_id= 1; - - -ALTER TABLE `chart` - modify `user_id` bigint(20) unsigned NOT NULL DEFAULT 1 COMMENT '用户id'; -update chart -set user_id= 1; +# ALTER TABLE `operation_saved` +# modify COLUMN `user_id` bigint(20) unsigned NOT NULL DEFAULT 1 COMMENT '用户id'; +# +# update operation_saved +# set user_id= 1; +# +# ALTER TABLE `dashboard` +# modify `user_id` bigint(20) unsigned NOT NULL DEFAULT 1 COMMENT '用户id'; +# update dashboard +# set user_id= 1; +# +# +# ALTER TABLE `chart` +# modify `user_id` bigint(20) unsigned NOT NULL DEFAULT 1 COMMENT '用户id'; +# update chart +# set user_id= 1;