Humble Trader

Sunday, September 17, 2006

Control Repository - mapping_libraries_c.sql

-- ------------------------------------------------------------------------- --
-- --
-- Title: mapping_libraries_c.sql --
-- Author: Steve Roach --
-- Date: 23-AUG-2006 --
-- Version: 01.00 --
-- --
-- Description: Create constraints for table MAPPING_LIBRARIES. --
-- --
-- History: --
-- --
-- Date Ver Author Description --
-- --------- ----- ------ -------------------------------------------------- --
-- 23-AUG-06 01.00 SRR First release --
-- --
-- ------------------------------------------------------------------------- --

ALTER TABLE mapping_libraries DROP CONSTRAINT mapping_libraries_pk
/

ALTER TABLE mapping_libraries DROP CONSTRAINT mapping_libraries_f1
/

ALTER TABLE mapping_libraries DROP CONSTRAINT mapping_libraries_f2
/

ALTER TABLE mapping_libraries ADD CONSTRAINT mapping_libraries_pk
PRIMARY KEY
(
mapping_name
) USING INDEX mapping_libraries_pk
/

ALTER TABLE mapping_libraries ADD CONSTRAINT mapping_libraries_f1
FOREIGN KEY
(
rep_from
) REFERENCES repositories(name)
/

ALTER TABLE mapping_libraries ADD CONSTRAINT mapping_libraries_f2
FOREIGN KEY
(
rep_to
) REFERENCES repositories(name)
/

0 Comments:

Post a Comment

<< Home