IF NOT EXISTS (SELECT * FROM SYS.COLUMNS WHERE NAME = 'CD_FORN' AND OBJECT_ID = OBJECT_ID('TRILHO'))
	BEGIN
		BEGIN TRAN
		BEGIN TRY
			ALTER TABLE TRILHO ADD CD_FORN INT DEFAULT NULL;
			ALTER TABLE TRILHO ADD CONSTRAINT FK_TRILHO_PG_FORN_CD_FORN FOREIGN KEY (CD_EMP, CD_FORN) REFERENCES PG_FORN (CD_EMP, CD_FORN);
			COMMIT;
		END TRY
		BEGIN CATCH
			ROLLBACK;
		END CATCH
	END
