You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by na...@apache.org on 2010/10/14 00:08:42 UTC

svn commit: r1022309 - in /hadoop/hive/branches/branch-0.6: CHANGES.txt metastore/scripts/upgrade/postgres/ metastore/scripts/upgrade/postgres/upgrade-0.6.0.postgres.sql

Author: namit
Date: Wed Oct 13 22:08:41 2010
New Revision: 1022309

URL: http://svn.apache.org/viewvc?rev=1022309&view=rev
Log:
HIVE-1709. Add Postgres database migration scripts (0.5 -> 0.6)
(Yuanjun Li via namit)


Added:
    hadoop/hive/branches/branch-0.6/metastore/scripts/upgrade/postgres/
    hadoop/hive/branches/branch-0.6/metastore/scripts/upgrade/postgres/upgrade-0.6.0.postgres.sql
Modified:
    hadoop/hive/branches/branch-0.6/CHANGES.txt

Modified: hadoop/hive/branches/branch-0.6/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.6/CHANGES.txt?rev=1022309&r1=1022308&r2=1022309&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.6/CHANGES.txt (original)
+++ hadoop/hive/branches/branch-0.6/CHANGES.txt Wed Oct 13 22:08:41 2010
@@ -111,6 +111,9 @@ Release 0.6.0 -  Unreleased
     HIVE-1427. Add metastore schema migration scripts (0.5 -> 0.6)
     (Carl Steinback via namit)
 
+    HIVE-1709. Add Postgres database migration scripts (0.5 -> 0.6)
+    (Yuanjun Li via namit)
+
   IMPROVEMENTS
     HIVE-983. Function from_unixtime takes long.
     (Ning Zhang via zshao)

Added: hadoop/hive/branches/branch-0.6/metastore/scripts/upgrade/postgres/upgrade-0.6.0.postgres.sql
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.6/metastore/scripts/upgrade/postgres/upgrade-0.6.0.postgres.sql?rev=1022309&view=auto
==============================================================================
--- hadoop/hive/branches/branch-0.6/metastore/scripts/upgrade/postgres/upgrade-0.6.0.postgres.sql (added)
+++ hadoop/hive/branches/branch-0.6/metastore/scripts/upgrade/postgres/upgrade-0.6.0.postgres.sql Wed Oct 13 22:08:41 2010
@@ -0,0 +1,27 @@
+-- HIVE-972: Support views
+ALTER TABLE "TBLS" ADD COLUMN "VIEW_EXPANDED_TEXT" text;
+ALTER TABLE "TBLS" ADD COLUMN "VIEW_ORIGINAL_TEXT" text;
+
+-- HIVE-1068: CREATE VIEW followup: add a 'table type' enum
+--            attribute in metastore
+ALTER TABLE "TBLS" ADD COLUMN "TBL_TYPE" character varying(128);
+
+-- HIVE-675: Add database/schema support for Hive QL
+ALTER TABLE "DBS" ALTER "DESC" TYPE character varying(4000);
+ALTER TABLE "DBS" ADD COLUMN "DB_LOCATION_URI" character varying(4000) NOT NULL DEFAULT ''::character varying;
+
+-- HIVE-1364: Increase the maximum length of various metastore fields,
+--            and remove TYPE_NAME from COLUMNS primary key
+ALTER TABLE "TBLS" ALTER "OWNER" TYPE character varying(767);
+ALTER TABLE "COLUMNS" ALTER "TYPE_NAME" TYPE character varying(4000);
+ALTER TABLE "PARTITION_KEYS" ALTER "PKEY_COMMENT" TYPE character varying(4000);
+ALTER TABLE "SD_PARAMS" ALTER "PARAM_VALUE" TYPE character varying(4000);
+ALTER TABLE "SDS" ALTER "INPUT_FORMAT" TYPE character varying(4000);
+ALTER TABLE "SDS" ALTER "LOCATION" TYPE character varying(4000);
+ALTER TABLE "SDS" ALTER "OUTPUT_FORMAT" TYPE character varying(4000);
+ALTER TABLE "SERDE_PARAMS" ALTER "PARAM_VALUE" TYPE character varying(4000);
+ALTER TABLE "SERDES" ALTER "SLIB" TYPE character varying(4000);
+ALTER TABLE "TABLE_PARAMS" ALTER "PARAM_VALUE" TYPE character varying(4000);
+ALTER TABLE "COLUMNS" DROP CONSTRAINT "COLUMNS_pkey";
+ALTER TABLE "COLUMNS" ADD CONSTRAINT "COLUMNS_pkey" PRIMARY KEY ("SD_ID", "COLUMN_NAME");
+ALTER TABLE "PARTITION_PARAMS" ALTER "PARAM_VALUE" TYPE character varying(4000);