diff --git a/server/controller/src/main/resources/db/migration/v0_3_2/V0_3_2_001__create_schema.sql b/server/controller/src/main/resources/db/migration/v0_3_2/V0_3_2_003__create_schema.sql similarity index 97% rename from server/controller/src/main/resources/db/migration/v0_3_2/V0_3_2_001__create_schema.sql rename to server/controller/src/main/resources/db/migration/v0_3_2/V0_3_2_003__create_schema.sql index 72be739936..7e301edf3a 100644 --- a/server/controller/src/main/resources/db/migration/v0_3_2/V0_3_2_001__create_schema.sql +++ b/server/controller/src/main/resources/db/migration/v0_3_2/V0_3_2_003__create_schema.sql @@ -321,11 +321,7 @@ CREATE TABLE IF NOT EXISTS `project_info` PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `unq_project_name_owner` (`project_name`, `owner_id`) USING BTREE, INDEX `idx_create_user_id` (`owner_id`) USING BTREE -) ENGINE = InnoDB - AUTO_INCREMENT = 4 - CHARACTER SET = utf8 - COLLATE = utf8_general_ci - ROW_FORMAT = Dynamic; +); -- ---------------------------- -- Table structure for runtime_info @@ -465,11 +461,7 @@ CREATE TABLE IF NOT EXISTS `user_info` `modified_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `uk_user_name` (`user_name`) USING BTREE -) ENGINE = InnoDB - AUTO_INCREMENT = 3 - CHARACTER SET = utf8 - COLLATE = utf8_general_ci - ROW_FORMAT = Dynamic; +); -- ---------------------------- -- Table structure for user_role_info @@ -483,11 +475,7 @@ CREATE TABLE IF NOT EXISTS `user_role_info` `role_description` varchar(255) NOT NULL, PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `uk_role_name` (`role_name`) USING BTREE -) ENGINE = InnoDB - AUTO_INCREMENT = 4 - CHARACTER SET = utf8 - COLLATE = utf8_general_ci - ROW_FORMAT = Dynamic; +); -- ---------------------------- -- Table structure for user_role_rel @@ -506,11 +494,7 @@ CREATE TABLE IF NOT EXISTS `user_role_rel` INDEX `idx_user_id` (`user_id`) USING BTREE, INDEX `idx_role_id` (`role_id`) USING BTREE, INDEX `idx_project_id` (`project_id`) USING BTREE -) ENGINE = InnoDB - AUTO_INCREMENT = 5 - CHARACTER SET = utf8 - COLLATE = utf8_general_ci - ROW_FORMAT = Dynamic; +); -- ---------------------------- -- Table structure for view_config diff --git a/server/controller/src/main/resources/db/migration/v0_3_2/V0_3_2_002__init_data.sql b/server/controller/src/main/resources/db/migration/v0_3_2/V0_3_2_004__init_data.sql similarity index 96% rename from server/controller/src/main/resources/db/migration/v0_3_2/V0_3_2_002__init_data.sql rename to server/controller/src/main/resources/db/migration/v0_3_2/V0_3_2_004__init_data.sql index b1bed6f10c..1b432350d9 100644 --- a/server/controller/src/main/resources/db/migration/v0_3_2/V0_3_2_002__init_data.sql +++ b/server/controller/src/main/resources/db/migration/v0_3_2/V0_3_2_004__init_data.sql @@ -23,7 +23,7 @@ insert ignore into user_info(user_name, user_pwd, user_pwd_salt, user_enabled) values ('test', '7ce1c1d60c3393e4ca681e738036fe8c', 'be1866739033b7907631a71e', 0); insert ignore into project_info(project_name, owner_id) -values ('starwhale', 1); +values ('starwhale', (select id from user_info where user_name='starwhale')); insert ignore into user_role_info(role_name, role_code, role_description) values ('Owner', 'OWNER', '');