File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- use zstack;
2-
31-- Update `schema_version' since we've changed SQL to match the expectation
42-- of the newer version MariaDB.
53DELIMITER $$
@@ -8,12 +6,15 @@ DROP PROCEDURE IF EXISTS `update_schema_checksum` $$
86
97CREATE PROCEDURE ` update_schema_checksum` ()
108BEGIN
11- IF EXISTS(SELECT table_name FROM information_schema .tables WHERE table_name = ' schema_version ' )
9+ IF EXISTS(SELECT schema_name FROM information_schema .schemata WHERE schema_name = ' zstack ' )
1210 THEN
13- update ` schema_version` set ` checksum` = 1083194846 where ` script` = ' V1.6__schema.sql' and ` checksum` <> 1083194846 ;
14- update ` schema_version` set ` checksum` = - 1569422253 where ` script` = ' V2.1.0__schema.sql' and ` checksum` <> - 1569422253 ;
15- update ` schema_version` set ` checksum` = 1564279419 where ` script` = ' V3.0.0__schema.sql' and ` checksum` <> 1564279419 ;
16- update ` schema_version` set ` checksum` = 565652311 where ` script` = ' V3.7.2__schema.sql' and ` checksum` <> 565652311 ;
11+ IF EXISTS(SELECT table_name FROM information_schema .tables WHERE table_name = ' schema_version' )
12+ THEN
13+ update ` zstack` .` schema_version` set ` checksum` = 1083194846 where ` script` = ' V1.6__schema.sql' and ` checksum` <> 1083194846 ;
14+ update ` zstack` .` schema_version` set ` checksum` = - 1569422253 where ` script` = ' V2.1.0__schema.sql' and ` checksum` <> - 1569422253 ;
15+ update ` zstack` .` schema_version` set ` checksum` = 1564279419 where ` script` = ' V3.0.0__schema.sql' and ` checksum` <> 1564279419 ;
16+ update ` zstack` .` schema_version` set ` checksum` = 565652311 where ` script` = ' V3.7.2__schema.sql' and ` checksum` <> 565652311 ;
17+ END IF;
1718 END IF;
1819END $$
1920
You can’t perform that action at this time.
0 commit comments