﻿--Migration
IF COL_LENGTH('T_DKT_FELADAT', 'C_KURZUSID') IS NULL BEGIN
  ALTER TABLE T_DKT_FELADAT ADD
    C_KURZUSID uniqueidentifier NULL
END  
Go

IF COL_LENGTH('T_DKT_FELADAT', 'C_KURZUSOBJECTID') IS NULL BEGIN
  ALTER TABLE T_DKT_FELADAT ADD
    C_KURZUSOBJECTID uniqueidentifier NULL
END  
GO


EXEC dev.uspCreateSchemaViews 'T_DKT_FELADAT'
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
