SELECT '< HIVE-1364: Increase the maximum length of various metastore fields >';
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);

