
/*------ ATD 282156 ------*/
IF NOT EXISTS (SELECT T.NAME TABELA, C.NAME COLUNA FROM SYSCOLUMNS C, SYSOBJECTS T
				WHERE T.XTYPE = 'U' AND C.ID = T.ID AND T.NAME = 'TABTRANFAT' AND C.NAME = 'EmiteMDFe')
BEGIN
	ALTER TABLE TABTRANFAT ADD EmiteMDFe Numeric(1) NOT NULL CONSTRAINT DF_TABTRANFATEMITEMDFE DEFAULT 0
	exec('UPDATE TABTRANFAT SET EmiteMDFe = 1 ')
END
GO