diff --git metastore/scripts/upgrade/postgres/014-HIVE-3764.postgres.sql metastore/scripts/upgrade/postgres/014-HIVE-3764.postgres.sql index 162d821..8b7f13c 100644 --- metastore/scripts/upgrade/postgres/014-HIVE-3764.postgres.sql +++ metastore/scripts/upgrade/postgres/014-HIVE-3764.postgres.sql @@ -4,9 +4,8 @@ CREATE TABLE "VERSION" ( "VER_ID" bigint, "SCHEMA_VERSION" character varying(127) NOT NULL, - "VERSION_COMMENT" character varying(255) NOT NULL, - PRIMARY KEY ("VER_ID") + "VERSION_COMMENT" character varying(255) NOT NULL ); ALTER TABLE ONLY "VERSION" ADD CONSTRAINT "VERSION_pkey" PRIMARY KEY ("VER_ID"); -INSERT INTO VERSION (VER_ID, SCHEMA_VERSION, VERSION_COMMENT) VALUES (1, '', 'Initial value'); +INSERT INTO "VERSION" ("VER_ID", "SCHEMA_VERSION", "VERSION_COMMENT") VALUES (1, '', 'Initial value'); diff --git metastore/scripts/upgrade/postgres/hive-schema-0.12.0.postgres.sql metastore/scripts/upgrade/postgres/hive-schema-0.12.0.postgres.sql index 8eff1b0..15cb4ee 100644 --- metastore/scripts/upgrade/postgres/hive-schema-0.12.0.postgres.sql +++ metastore/scripts/upgrade/postgres/hive-schema-0.12.0.postgres.sql @@ -522,7 +522,6 @@ CREATE TABLE "VERSION" ( "VER_ID" bigint, "SCHEMA_VERSION" character varying(127) NOT NULL, "VERSION_COMMENT" character varying(255) NOT NULL, - PRIMARY KEY ("VER_ID") ); -- @@ -1400,7 +1399,7 @@ 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.12.0', 'Hive release version 0.12.0'); +INSERT INTO "VERSION" ("VER_ID", "SCHEMA_VERSION", "VERSION_COMMENT") VALUES (1, '0.12.0', 'Hive release version 0.12.0'); -- -- PostgreSQL database dump complete -- 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 32e0467..678d876 100644 --- metastore/scripts/upgrade/postgres/hive-schema-0.13.0.postgres.sql +++ metastore/scripts/upgrade/postgres/hive-schema-0.13.0.postgres.sql @@ -521,8 +521,7 @@ CREATE TABLE "TAB_COL_STATS" ( CREATE TABLE "VERSION" ( "VER_ID" bigint, "SCHEMA_VERSION" character varying(127) NOT NULL, - "COMMENT" character varying(255) NOT NULL, - PRIMARY KEY ("VER_ID") + "VERSION_COMMENT" character varying(255) NOT NULL ); -- @@ -1400,7 +1399,7 @@ 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'); +INSERT INTO "VERSION" ("VER_ID", "SCHEMA_VERSION", "VERSION_COMMENT") VALUES (1, '0.13.0', 'Hive release version 0.13.0'); -- -- PostgreSQL database dump complete -- diff --git metastore/scripts/upgrade/postgres/upgrade-0.11.0-to-0.12.0.postgres.sql metastore/scripts/upgrade/postgres/upgrade-0.11.0-to-0.12.0.postgres.sql index f432a1a..7dffbca 100644 --- metastore/scripts/upgrade/postgres/upgrade-0.11.0-to-0.12.0.postgres.sql +++ metastore/scripts/upgrade/postgres/upgrade-0.11.0-to-0.12.0.postgres.sql @@ -1,5 +1,5 @@ SELECT 'Upgrading MetaStore schema from 0.11.0 to 0.12.0'; \i 013-HIVE-3255.postgres.sql; \i 014-HIVE-3764.postgres.sql; -UPDATE VERSION SET SCHEMA_VERSION='0.12.0', VERSION_COMMENT='Hive release version 0.12.0' where VER_ID=1; +UPDATE "VERSION" SET "SCHEMA_VERSION"='0.12.0', "VERSION_COMMENT"='Hive release version 0.12.0' where "VER_ID"=1; SELECT 'Finished upgrading MetaStore schema from 0.11.0 to 0.12.0'; diff --git metastore/scripts/upgrade/postgres/upgrade-0.12.0-to-0.13.0.postgres.sql metastore/scripts/upgrade/postgres/upgrade-0.12.0-to-0.13.0.postgres.sql index c11aeba..01cbe76 100644 --- metastore/scripts/upgrade/postgres/upgrade-0.12.0-to-0.13.0.postgres.sql +++ metastore/scripts/upgrade/postgres/upgrade-0.12.0-to-0.13.0.postgres.sql @@ -1,3 +1,3 @@ SELECT 'Upgrading MetaStore schema from 0.11.0 to 0.12.0'; -UPDATE VERSION SET SCHEMA_VERSION='0.13.0', VERSION_COMMENT='Hive release version 0.13.0' where VER_ID=1; +UPDATE "VERSION" SET "SCHEMA_VERSION"='0.13.0', "VERSION_COMMENT"='Hive release version 0.13.0' where "VER_ID"=1; SELECT 'Finished upgrading MetaStore schema from 0.11.0 to 0.12.0';