﻿--Migration
ALTER TABLE T_DKT_ALKALMAZOTTBEALLITAS DROP CONSTRAINT IF EXISTS FK_DKT_AlkalmazottBeallitas_HfErteklesTipusId_IntezmenyId_TanevId_REF_DKT_DIC_HfErteklesTipus
ALTER TABLE T_DKT_ALKALMAZOTTBEALLITAS DROP CONSTRAINT IF EXISTS FK_DKT_AlkalmazottBeallitas_OfErtekelesTipusId_IntezmenyId_TanevId_REF_DKT_DIC_OfErteklesTipus
GO

ALTER TABLE [DBO].T_DKT_ALKALMAZOTTBEALLITAS 
  ADD CONSTRAINT FK_DKT_AlkalmazottBeallitas_HfErteklesTipusId_IntezmenyId_TanevId_REF_DKT_DIC_FeladatErtekelesTipus 
  FOREIGN KEY (C_HFERTEKLESTIPUSID, C_INTEZMENYID, C_TANEVID) 
  REFERENCES [dbo].T_DKT_DIC_FELADATERTEKELESTIPUS (ID, C_INTEZMENYID, C_TANEVID)
GO

ALTER TABLE [DBO].T_DKT_ALKALMAZOTTBEALLITAS 
  ADD CONSTRAINT FK_DKT_AlkalmazottBeallitas_OfErtekelesTipusId_IntezmenyId_TanevId_REF_DKT_DIC_FeladatErtekelesTipus 
  FOREIGN KEY (C_HFERTEKLESTIPUSID, C_INTEZMENYID, C_TANEVID) 
  REFERENCES [dbo].T_DKT_DIC_FELADATERTEKELESTIPUS (ID, C_INTEZMENYID, C_TANEVID)
GO

DROP TABLE IF EXISTS T_DKT_DIC_OfErteklesTipus
GO

DROP TABLE IF EXISTS T_DKT_DIC_HfErteklesTipus
GO
