if not exists (select 1 FROM INFORMATION_SCHEMA.COLUMNS where Table_Name='cat_atributo_opcionAtributo'  and column_name = 'id_atributo' )
begin  
	alter table [cat_atributo_opcionAtributo] add [id_atributo] int NULL DEFAULT 0  FOREIGN KEY (id_atributo) REFERENCES cat_atributo(id)
end
go

if not exists (select 1 FROM INFORMATION_SCHEMA.COLUMNS where Table_Name='cat_atributo_opcionAtributo'  and column_name = 'id_opcionAtributo' )
begin  
	alter table [cat_atributo_opcionAtributo] add [id_opcionAtributo] int NULL DEFAULT 0  FOREIGN KEY (id_opcionAtributo) REFERENCES equ_opcionAtributo(id)
end
go
