IF EXISTS (SELECT * FROM SYS.default_constraints WHERE NAME = 'DF_GLB_USU_FORN_CD_FORN')
BEGIN
	ALTER TABLE GLB_USU_FORN DROP CONSTRAINT DF_GLB_USU_FORN_CD_FORN
END

IF EXISTS (SELECT * FROM SYS.foreign_keys WHERE NAME = 'FK_GLB_USU_FORN_PG_FORN_CD_FORN')
BEGIN
	ALTER TABLE GLB_USU_FORN DROP CONSTRAINT FK_GLB_USU_FORN_PG_FORN_CD_FORN
END

IF EXISTS (SELECT * FROM SYS.columns WHERE NAME = 'CD_FORN' AND OBJECT_ID = OBJECT_ID ('GLB_USU_FORN'))
BEGIN
	ALTER TABLE GLB_USU_FORN DROP COLUMN CD_FORN
END
