zeroflag commented on a change in pull request #1542: URL: https://github.com/apache/hive/pull/1542#discussion_r512590211
########## File path: standalone-metastore/metastore-server/src/main/sql/mysql/upgrade-3.2.0-to-4.0.0.mysql.sql ########## @@ -109,6 +109,20 @@ CREATE TABLE IF NOT EXISTS REPLICATION_METRICS ( CREATE INDEX POLICY_IDX ON REPLICATION_METRICS (RM_POLICY); CREATE INDEX DUMP_IDX ON REPLICATION_METRICS (RM_DUMP_EXECUTION_ID); +-- Create stored procedure tables +CREATE TABLE STORED_PROCS ( + `SP_ID` BIGINT(20) NOT NULL, + `CREATE_TIME` INT(11) NOT NULL, + `DB_ID` BIGINT(20) NOT NULL, + `NAME` VARCHAR(256) NOT NULL, + `OWNER_NAME` VARCHAR(128) NOT NULL, + `SOURCE` LONGTEXT NOT NULL, + PRIMARY KEY (`SP_ID`) +); + +CREATE UNIQUE INDEX UNIQUESTOREDPROC ON STORED_PROCS (NAME, DB_ID); +ALTER TABLE `STORED_PROCS` ADD CONSTRAINT `STOREDPROC_FK1` FOREIGN KEY (`DB_ID`) REFERENCES DBS (`DB_ID`); Review comment: good catch, fixed it. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org