diff --git metastore/scripts/upgrade/derby/hive-schema-0.13.0.derby.sql metastore/scripts/upgrade/derby/hive-schema-0.13.0.derby.sql index a185984..1ba32b8 100644 --- metastore/scripts/upgrade/derby/hive-schema-0.13.0.derby.sql +++ metastore/scripts/upgrade/derby/hive-schema-0.13.0.derby.sql @@ -314,8 +314,6 @@ ALTER TABLE "APP"."IDXS" ADD CONSTRAINT "SQL110318025504980" CHECK (DEFERRED_REB ALTER TABLE "APP"."SDS" ADD CONSTRAINT "SQL110318025505550" CHECK (IS_COMPRESSED IN ('Y','N')); -INSERT INTO "APP"."VERSION" (VER_ID, SCHEMA_VERSION, VERSION_COMMENT) VALUES (1, '0.13.0', 'Hive release version 0.13.0'); - -- ----------------------------------------------------------------------------------------------------------------------------------------------- -- Transaction and Lock Tables -- These are not part of package jdo, so if you are going to regenerate this file you need to manually add the following section back to the file. @@ -390,4 +388,8 @@ CREATE TABLE NEXT_COMPACTION_QUEUE_ID ( INSERT INTO NEXT_COMPACTION_QUEUE_ID VALUES(1); +-- ----------------------------------------------------------------- +-- Record schema version. Should be the last step in the init script +-- ----------------------------------------------------------------- +INSERT INTO "APP"."VERSION" (VER_ID, SCHEMA_VERSION, VERSION_COMMENT) VALUES (1, '0.13.0', 'Hive release version 0.13.0'); diff --git metastore/scripts/upgrade/derby/hive-schema-0.14.0.derby.sql metastore/scripts/upgrade/derby/hive-schema-0.14.0.derby.sql index a4724a2..11ce4d6 100644 --- metastore/scripts/upgrade/derby/hive-schema-0.14.0.derby.sql +++ metastore/scripts/upgrade/derby/hive-schema-0.14.0.derby.sql @@ -314,9 +314,13 @@ ALTER TABLE "APP"."IDXS" ADD CONSTRAINT "SQL110318025504980" CHECK (DEFERRED_REB ALTER TABLE "APP"."SDS" ADD CONSTRAINT "SQL110318025505550" CHECK (IS_COMPRESSED IN ('Y','N')); -INSERT INTO "APP"."VERSION" (VER_ID, SCHEMA_VERSION, VERSION_COMMENT) VALUES (1, '0.14.0', 'Hive release version 0.14.0'); - -- ---------------------------- -- Transaction and Lock Tables -- ---------------------------- RUN 'hive-txn-schema-0.13.0.derby.sql'; + +-- ----------------------------------------------------------------- +-- Record schema version. Should be the last step in the init script +-- ----------------------------------------------------------------- +INSERT INTO "APP"."VERSION" (VER_ID, SCHEMA_VERSION, VERSION_COMMENT) VALUES (1, '0.14.0', 'Hive release version 0.14.0'); + diff --git metastore/scripts/upgrade/mysql/hive-schema-0.13.0.mysql.sql metastore/scripts/upgrade/mysql/hive-schema-0.13.0.mysql.sql index 35531a8..0cb5e86 100644 --- metastore/scripts/upgrade/mysql/hive-schema-0.13.0.mysql.sql +++ metastore/scripts/upgrade/mysql/hive-schema-0.13.0.mysql.sql @@ -794,8 +794,6 @@ CREATE TABLE IF NOT EXISTS `FUNC_RU` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -INSERT INTO VERSION (VER_ID, SCHEMA_VERSION, VERSION_COMMENT) VALUES (1, '0.13.0', 'Hive release version 0.13.0'); - -- ----------------------------------------------------------------------------------------------------------------------------------------------- -- Transaction and Lock Tables -- These are not part of package jdo, so if you are going to regenerate this file you need to manually add the following section back to the file. @@ -872,6 +870,11 @@ CREATE TABLE NEXT_COMPACTION_QUEUE_ID ( INSERT INTO NEXT_COMPACTION_QUEUE_ID VALUES(1); +-- ----------------------------------------------------------------- +-- Record schema version. Should be the last step in the init script +-- ----------------------------------------------------------------- +INSERT INTO VERSION (VER_ID, SCHEMA_VERSION, VERSION_COMMENT) VALUES (1, '0.13.0', 'Hive release version 0.13.0'); + /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; diff --git metastore/scripts/upgrade/mysql/hive-schema-0.14.0.mysql.sql metastore/scripts/upgrade/mysql/hive-schema-0.14.0.mysql.sql index bf0324e..a509175 100644 --- metastore/scripts/upgrade/mysql/hive-schema-0.14.0.mysql.sql +++ metastore/scripts/upgrade/mysql/hive-schema-0.14.0.mysql.sql @@ -794,13 +794,16 @@ CREATE TABLE IF NOT EXISTS `FUNC_RU` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -INSERT INTO VERSION (VER_ID, SCHEMA_VERSION, VERSION_COMMENT) VALUES (1, '0.14.0', 'Hive release version 0.14.0'); - -- ---------------------------- -- Transaction and Lock Tables -- ---------------------------- SOURCE hive-txn-schema-0.13.0.mysql.sql; +-- ----------------------------------------------------------------- +-- Record schema version. Should be the last step in the init script +-- ----------------------------------------------------------------- +INSERT INTO VERSION (VER_ID, SCHEMA_VERSION, VERSION_COMMENT) VALUES (1, '0.14.0', 'Hive release version 0.14.0'); + /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; diff --git metastore/scripts/upgrade/oracle/hive-schema-0.13.0.oracle.sql metastore/scripts/upgrade/oracle/hive-schema-0.13.0.oracle.sql index 12c0545..f819187 100644 --- metastore/scripts/upgrade/oracle/hive-schema-0.13.0.oracle.sql +++ metastore/scripts/upgrade/oracle/hive-schema-0.13.0.oracle.sql @@ -754,8 +754,6 @@ ALTER TABLE FUNC_RU ADD CONSTRAINT FUNC_RU_FK1 FOREIGN KEY (FUNC_ID) REFERENCES CREATE INDEX FUNC_RU_N49 ON FUNC_RU (FUNC_ID); -INSERT INTO VERSION (VER_ID, SCHEMA_VERSION, VERSION_COMMENT) VALUES (1, '0.13.0', 'Hive release version 0.13.0'); - -- ----------------------------------------------------------------------------------------------------------------------------------------------- -- Transaction and Lock Tables -- These are not part of package jdo, so if you are going to regenerate this file you need to manually add the following section back to the file. @@ -830,3 +828,8 @@ CREATE TABLE NEXT_COMPACTION_QUEUE_ID ( INSERT INTO NEXT_COMPACTION_QUEUE_ID VALUES(1); +-- ----------------------------------------------------------------- +-- Record schema version. Should be the last step in the init script +-- ----------------------------------------------------------------- +INSERT INTO VERSION (VER_ID, SCHEMA_VERSION, VERSION_COMMENT) VALUES (1, '0.13.0', 'Hive release version 0.13.0'); + diff --git metastore/scripts/upgrade/oracle/hive-schema-0.14.0.oracle.sql metastore/scripts/upgrade/oracle/hive-schema-0.14.0.oracle.sql index 2282bf0..d43b59b 100644 --- metastore/scripts/upgrade/oracle/hive-schema-0.14.0.oracle.sql +++ metastore/scripts/upgrade/oracle/hive-schema-0.14.0.oracle.sql @@ -753,10 +753,12 @@ ALTER TABLE FUNC_RU ADD CONSTRAINT FUNC_RU_FK1 FOREIGN KEY (FUNC_ID) REFERENCES CREATE INDEX FUNC_RU_N49 ON FUNC_RU (FUNC_ID); - -INSERT INTO VERSION (VER_ID, SCHEMA_VERSION, VERSION_COMMENT) VALUES (1, '0.14.0', 'Hive release version 0.14.0'); - ------------------------------ -- Transaction and lock tables ------------------------------ @hive-txn-schema-0.13.0.oracle.sql; + +-- ----------------------------------------------------------------- +-- Record schema version. Should be the last step in the init script +-- ----------------------------------------------------------------- +INSERT INTO VERSION (VER_ID, SCHEMA_VERSION, VERSION_COMMENT) VALUES (1, '0.14.0', 'Hive release version 0.14.0'); diff --git metastore/scripts/upgrade/postgres/hive-schema-0.13.0.postgres.sql metastore/scripts/upgrade/postgres/hive-schema-0.13.0.postgres.sql index c981ca1..7b886e1 100644 --- metastore/scripts/upgrade/postgres/hive-schema-0.13.0.postgres.sql +++ metastore/scripts/upgrade/postgres/hive-schema-0.13.0.postgres.sql @@ -1453,7 +1453,6 @@ REVOKE ALL ON SCHEMA public FROM PUBLIC; GRANT ALL ON SCHEMA public TO PUBLIC; -INSERT INTO "VERSION" ("VER_ID", "SCHEMA_VERSION", "VERSION_COMMENT") VALUES (1, '0.13.0', 'Hive release version 0.13.0'); -- -- PostgreSQL database dump complete -- @@ -1532,4 +1531,8 @@ CREATE TABLE NEXT_COMPACTION_QUEUE_ID ( INSERT INTO NEXT_COMPACTION_QUEUE_ID VALUES(1); +-- ----------------------------------------------------------------- +-- Record schema version. Should be the last step in the init script +-- ----------------------------------------------------------------- +INSERT INTO "VERSION" ("VER_ID", "SCHEMA_VERSION", "VERSION_COMMENT") VALUES (1, '0.13.0', 'Hive release version 0.13.0'); diff --git metastore/scripts/upgrade/postgres/hive-schema-0.14.0.postgres.sql metastore/scripts/upgrade/postgres/hive-schema-0.14.0.postgres.sql index a4ada28..e292850 100644 --- metastore/scripts/upgrade/postgres/hive-schema-0.14.0.postgres.sql +++ metastore/scripts/upgrade/postgres/hive-schema-0.14.0.postgres.sql @@ -1452,8 +1452,6 @@ ALTER TABLE ONLY "FUNC_RU" REVOKE ALL ON SCHEMA public FROM PUBLIC; GRANT ALL ON SCHEMA public TO PUBLIC; - -INSERT INTO "VERSION" ("VER_ID", "SCHEMA_VERSION", "VERSION_COMMENT") VALUES (1, '0.14.0', 'Hive release version 0.14.0'); -- -- PostgreSQL database dump complete -- @@ -1462,3 +1460,8 @@ INSERT INTO "VERSION" ("VER_ID", "SCHEMA_VERSION", "VERSION_COMMENT") VALUES (1, -- Transaction and lock tables ------------------------------ \i hive-txn-schema-0.13.0.postgres.sql; + +-- ----------------------------------------------------------------- +-- Record schema version. Should be the last step in the init script +-- ----------------------------------------------------------------- +INSERT INTO "VERSION" ("VER_ID", "SCHEMA_VERSION", "VERSION_COMMENT") VALUES (1, '0.14.0', 'Hive release version 0.14.0');