
/*------ ATD 368355 ------*/
IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'BASECALFAT' and column_name = 'CODIGOCEST')
begin
	ALTER TABLE BASECALFAT ADD CODIGOCEST CHAR(14) NOT NULL DEFAULT ''
end
go

IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'ITNFSAICAD' and column_name = 'IDCODREDBASE')
begin
	ALTER TABLE ITNFSAICAD ADD IDCODREDBASE INT NULL
end
go

IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'ITNFENTCAD' and column_name = 'IDCODREDBASE')
begin
	ALTER TABLE ITNFENTCAD ADD IDCODREDBASE INT NULL
end
go