
if not exists (select * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS where CONSTRAINT_NAME= 'FK_equ_cicloHorometro_id_equipo')
begin
ALTER TABLE [equ_cicloHorometro] ADD CONSTRAINT
	FK_equ_cicloHorometro_id_equipo FOREIGN KEY
	([id_equipo]) REFERENCES [equ_equipo]
	(id) ON UPDATE  NO ACTION ON DELETE  NO ACTION 
end
go
if not exists (select * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS where CONSTRAINT_NAME= 'FK_equ_trazabilidad_id_cicloHorometro')
begin 
 ALTER TABLE [equ_trazabilidad] ADD CONSTRAINT
	FK_equ_trazabilidad_id_cicloHorometro FOREIGN KEY
	([id_cicloHorometro]) REFERENCES [equ_cicloHorometro]
	(id) ON UPDATE  NO ACTION ON DELETE  NO ACTION 
end
go
