lasdf1234 commented on code in PR #10969:
URL: https://github.com/apache/gravitino/pull/10969#discussion_r3208463979
##########
scripts/mysql/upgrade-1.2.0-to-1.3.0-mysql.sql:
##########
@@ -78,3 +78,39 @@ CREATE TABLE IF NOT EXISTS `view_version_info` (
KEY `idx_vvcid` (`catalog_id`),
KEY `idx_vvsid` (`schema_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT 'view
version info';
+
+CREATE TABLE IF NOT EXISTS `idp_user_meta` (
+ `user_id` BIGINT(20) UNSIGNED NOT NULL COMMENT 'idp user id',
+ `user_name` VARCHAR(128) NOT NULL COMMENT 'idp username',
+ `password_hash` VARCHAR(1024) NOT NULL COMMENT 'idp user password hash',
+ `audit_info` MEDIUMTEXT NOT NULL COMMENT 'idp user audit info',
+ `current_version` INT UNSIGNED NOT NULL DEFAULT 1 COMMENT 'idp user
current version',
+ `last_version` INT UNSIGNED NOT NULL DEFAULT 1 COMMENT 'idp user last
version',
+ `deleted_at` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'idp user
deleted at',
+ PRIMARY KEY (`user_id`),
+ UNIQUE KEY `uk_iun_del` (`user_name`, `deleted_at`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT 'local IdP
user metadata';
Review Comment:
PR '9207' has removed this test
##########
scripts/mysql/upgrade-1.2.0-to-1.3.0-mysql.sql:
##########
@@ -78,3 +78,39 @@ CREATE TABLE IF NOT EXISTS `view_version_info` (
KEY `idx_vvcid` (`catalog_id`),
KEY `idx_vvsid` (`schema_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT 'view
version info';
+
+CREATE TABLE IF NOT EXISTS `idp_user_meta` (
+ `user_id` BIGINT(20) UNSIGNED NOT NULL COMMENT 'idp user id',
+ `user_name` VARCHAR(128) NOT NULL COMMENT 'idp username',
+ `password_hash` VARCHAR(1024) NOT NULL COMMENT 'idp user password hash',
+ `audit_info` MEDIUMTEXT NOT NULL COMMENT 'idp user audit info',
+ `current_version` INT UNSIGNED NOT NULL DEFAULT 1 COMMENT 'idp user
current version',
+ `last_version` INT UNSIGNED NOT NULL DEFAULT 1 COMMENT 'idp user last
version',
+ `deleted_at` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'idp user
deleted at',
+ PRIMARY KEY (`user_id`),
+ UNIQUE KEY `uk_iun_del` (`user_name`, `deleted_at`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT 'local IdP
user metadata';
+
+CREATE TABLE IF NOT EXISTS `idp_group_meta` (
+ `group_id` BIGINT(20) UNSIGNED NOT NULL COMMENT 'idp group id',
+ `group_name` VARCHAR(128) NOT NULL COMMENT 'idp group name',
+ `audit_info` MEDIUMTEXT NOT NULL COMMENT 'idp group audit info',
+ `current_version` INT UNSIGNED NOT NULL DEFAULT 1 COMMENT 'idp group
current version',
+ `last_version` INT UNSIGNED NOT NULL DEFAULT 1 COMMENT 'idp group last
version',
+ `deleted_at` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'idp group
deleted at',
+ PRIMARY KEY (`group_id`),
+ UNIQUE KEY `uk_ign_del` (`group_name`, `deleted_at`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT 'local IdP
group metadata';
+
+CREATE TABLE IF NOT EXISTS `idp_group_user_rel` (
+ `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'auto increment
id',
+ `group_id` BIGINT(20) UNSIGNED NOT NULL COMMENT 'idp group id',
+ `user_id` BIGINT(20) UNSIGNED NOT NULL COMMENT 'idp user id',
+ `audit_info` MEDIUMTEXT NOT NULL COMMENT 'idp group user relation audit
info',
+ `current_version` INT UNSIGNED NOT NULL DEFAULT 1 COMMENT 'idp relation
current version',
+ `last_version` INT UNSIGNED NOT NULL DEFAULT 1 COMMENT 'idp relation last
version',
+ `deleted_at` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'idp relation
deleted at',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `uk_igiu_del` (`group_id`, `user_id`, `deleted_at`),
Review Comment:
resolved
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]