if not exists (select 1 from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 'ort_reporteTecnico_falla' and COLUMN_NAME = 'id_falla_causa')
begin
	ALTER TABLE [ort_reporteTecnico_falla] ADD [id_falla_causa] INT NOT NULL DEFAULT 0
	FOREIGN KEY ([id_falla_causa]) REFERENCES [equ_falla](id)
end
go

if not exists (select 1 from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 'ort_reporteTecnico_falla' and COLUMN_NAME = 'id_falla_efecto')
begin
	ALTER TABLE [ort_reporteTecnico_falla] ADD [id_falla_efecto] INT NOT NULL DEFAULT 0
	FOREIGN KEY ([id_falla_efecto]) REFERENCES [equ_falla](id)
end
go
