From 5bd20e57bfdad700850cb7a657ffdb4905ad4bd2 Mon Sep 17 00:00:00 2001 From: Deepesh Khandelwal Date: Tue, 16 Jan 2018 23:27:26 -0800 Subject: [PATCH] HIVE-18465: Hive metastore schema initialization failing on postgres --- metastore/scripts/upgrade/postgres/hive-schema-3.0.0.postgres.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/metastore/scripts/upgrade/postgres/hive-schema-3.0.0.postgres.sql b/metastore/scripts/upgrade/postgres/hive-schema-3.0.0.postgres.sql index 9e2dbc271e..28cb01684a 100644 --- a/metastore/scripts/upgrade/postgres/hive-schema-3.0.0.postgres.sql +++ b/metastore/scripts/upgrade/postgres/hive-schema-3.0.0.postgres.sql @@ -665,9 +665,6 @@ CREATE TABLE "MV_CREATION_METADATA" ( "LAST_TRANSACTION_INFO" TEXT NOT NULL ); -ALTER TABLE ONLY "MV_CREATION_METADATA" - ADD CONSTRAINT "MV_CREATION_METADATA_FK" FOREIGN KEY ("TBL_ID") REFERENCES "TBLS"("TBL_ID") DEFERRABLE; - -- -- Name: BUCKETING_COLS_pkey; Type: CONSTRAINT; Schema: public; Owner: hiveuser; Tablespace: -- @@ -1575,6 +1572,9 @@ ALTER TABLE ONLY "WM_MAPPING" ALTER TABLE ONLY "WM_MAPPING" ADD CONSTRAINT "WM_MAPPING_FK2" FOREIGN KEY ("POOL_ID") REFERENCES "WM_POOL" ("POOL_ID") DEFERRABLE; +ALTER TABLE ONLY "MV_CREATION_METADATA" + ADD CONSTRAINT "MV_CREATION_METADATA_FK" FOREIGN KEY ("TBL_ID") REFERENCES "TBLS"("TBL_ID") DEFERRABLE; + -- -- Name: public; Type: ACL; Schema: -; Owner: hiveuser -- -- 2.13.6 (Apple Git-96)