IF NOT EXISTS (SELECT * FROM SYS.COLUMNS WHERE NAME = 'CD_USU' AND OBJECT_ID = OBJECT_ID('GT_ENVIO_EMITENTE'))
BEGIN
	ALTER TABLE GT_ENVIO_EMITENTE ADD CD_USU INT NOT NULL CONSTRAINT DF_GT_ENVIO_EMITENTE_CD_USU DEFAULT 1
END


IF NOT EXISTS (SELECT * FROM SYS.COLUMNS WHERE NAME = 'DTHR_CAD' AND OBJECT_ID = OBJECT_ID('GT_ENVIO_EMITENTE'))
BEGIN
	ALTER TABLE GT_ENVIO_EMITENTE ADD DTHR_CAD DATETIME NOT NULL CONSTRAINT DF_GT_ENVIO_EMITENTE_DTHR_CAD DEFAULT GETDATE()
END
