Skip to content

Commit 8276487

Browse files
author
gitlab
committed
Merge branch 'fix-81060' into '5.5.0'
<fix>[conf]: fix database migration failure from 4.8.36 to 5.1.4+ See merge request zstackio/zstack!8989
2 parents bd14a13 + 9b55052 commit 8276487

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

conf/db/upgrade/V5.1.4__schema.sql

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
ALTER TABLE `zstack`.`OAuth2ClientVO` ADD COLUMN `scope` varchar(255) default 'openid';
2-
3-
ALTER TABLE `zstack`.`OAuth2ClientVO` ADD COLUMN `identityProvider` varchar(32) default 'default';
1+
CALL ADD_COLUMN('OAuth2ClientVO', 'scope', 'varchar(255)', 1, 'openid');
2+
CALL ADD_COLUMN('OAuth2ClientVO', 'identityProvider', 'varchar(32)', 1, 'default');

conf/db/upgrade/V5.4.0__schema.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CREATE TABLE `SSOClientAttributeVO` (
1+
CREATE TABLE IF NOT EXISTS `SSOClientAttributeVO` (
22
`uuid` VARCHAR(32) NOT NULL,
33
`name` TEXT NOT NULL,
44
`value` TEXT DEFAULT NULL,

conf/db/upgrade/beforeValidate.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ BEGIN
4040
update `zstack`.`schema_version` set `checksum`=1489363540 where `script`='V5.3.22__schema.sql' and `checksum` <> 1489363540;
4141
update `zstack`.`schema_version` set `checksum`=1648524318 where `script`='V4.4.0__schema.sql' and `checksum` <> 1648524318;
4242
update `zstack`.`schema_version` set `checksum`=-3265430 where `script`='V5.4.6__schema.sql' and `checksum` <> -3265430;
43+
update `zstack`.`schema_version` set `checksum`=-1455020895 where `script`='V5.1.4__schema.sql' and `checksum` <> -1455020895;
44+
update `zstack`.`schema_version` set `checksum`=569762641 where `script`='V5.4.0__schema.sql' and `checksum` <> 569762641;
4345
END IF;
4446
END $$
4547

0 commit comments

Comments
 (0)