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

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

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

