﻿--Migration

ALTER TABLE T_TANULO ADD C_ISDUALISKEPZESBEN char(1) DEFAULT 'F' NOT NULL
GO
ALTER TABLE T_TANULO ADD C_ISMASODIKTOBBSZAKMA char(1) DEFAULT 'F' NOT NULL
GO
ALTER TABLE T_TANULO ADD C_JOGVISZONYTIPUSID int NULL
GO

ALTER TABLE [DBO].T_TANULO 
  ADD CONSTRAINT FK_Tanulo_JogviszonyTipusID_AlintezmenyId_AltanevId_REF_JogviszonyTipus 
  FOREIGN KEY (C_JOGVISZONYTIPUSID, C_ALINTEZMENYID, C_ALTANEVID) 
  REFERENCES [dbo].T_JOGVISZONYTIPUS (ID, C_ALINTEZMENYID, C_ALTANEVID)

GO


CREATE INDEX NCI_Tanulo_AlintezmenyId_AltanevId_JogviszonyTipusID ON T_TANULO (C_ALINTEZMENYID, C_ALTANEVID, C_JOGVISZONYTIPUSID)
GO

EXEC dev.uspCreateSchemaViews 'T_TANULO'
GO

EXEC dev.sp_Global_GenerateAsyncAuditTriggerAll
GO

ALTER QUEUE auditLog.[AuditQueue]
WITH ACTIVATION (
  STATUS = ON,
  PROCEDURE_NAME = auditLog.usp_AuditProcessing,
  MAX_QUEUE_READERS = 10,
  EXECUTE AS 'Kreta_tech_user'
);
GO
