upgrade-0.6.0.derby.sql 1.5 KB

123456789101112131415161718192021222324252627
  1. -- HIVE-972: Support views
  2. ALTER TABLE "TBLS" ADD "VIEW_ORIGINAL_TEXT" LONG VARCHAR DEFAULT NULL;
  3. ALTER TABLE "TBLS" ADD "VIEW_EXPANDED_TEXT" LONG VARCHAR DEFAULT NULL;
  4. -- HIVE-1068: CREATE VIEW followup: add a 'table type' enum
  5. -- attribute in metastore
  6. ALTER TABLE "TBLS" ADD COLUMN "TBL_TYPE" VARCHAR(128);
  7. -- HIVE-675: Add database/schema support for Hive QL
  8. ALTER TABLE "DBS" ALTER "DESC" SET DATA TYPE VARCHAR(4000);
  9. ALTER TABLE "DBS" ADD "DB_LOCATION_URI" VARCHAR(4000) NOT NULL DEFAULT '';
  10. -- HIVE-1364: Increase the maximum length of various metastore fields,
  11. -- and remove TYPE_NAME from COLUMNS primary key
  12. ALTER TABLE "TBLS" ALTER "OWNER" SET DATA TYPE VARCHAR(767);
  13. ALTER TABLE "COLUMNS" ALTER "TYPE_NAME" SET DATA TYPE VARCHAR(4000);
  14. ALTER TABLE "PARTITION_KEYS" ALTER "PKEY_COMMENT" SET DATA TYPE VARCHAR(4000);
  15. ALTER TABLE "SD_PARAMS" ALTER "PARAM_VALUE" SET DATA TYPE VARCHAR(4000);
  16. ALTER TABLE "SDS" ALTER "INPUT_FORMAT" SET DATA TYPE VARCHAR(4000);
  17. ALTER TABLE "SDS" ALTER "LOCATION" SET DATA TYPE VARCHAR(4000);
  18. ALTER TABLE "SDS" ALTER "OUTPUT_FORMAT" SET DATA TYPE VARCHAR(4000);
  19. ALTER TABLE "SERDE_PARAMS" ALTER "PARAM_VALUE" SET DATA TYPE VARCHAR(4000);
  20. ALTER TABLE "SERDES" ALTER "SLIB" SET DATA TYPE VARCHAR(4000);
  21. ALTER TABLE "TABLE_PARAMS" ALTER "PARAM_VALUE" SET DATA TYPE VARCHAR(4000);
  22. ALTER TABLE "COLUMNS" DROP PRIMARY KEY;
  23. ALTER TABLE "COLUMNS" ADD PRIMARY KEY ("SD_ID", "COLUMN_NAME");
  24. ALTER TABLE "PARTITION_PARAMS" ALTER "PARAM_VALUE" SET DATA TYPE VARCHAR(4000);