﻿--Migration
ALTER TABLE T_INTEZMENYADATOK DROP COLUMN IF EXISTS C_DKTURL
GO

ALTER TABLE T_INTEZMENYADATOK ADD C_DKTTANARURL nvarchar(255) NULL
GO

ALTER TABLE T_INTEZMENYADATOK ADD C_DKTTANULOURL nvarchar(255) NULL
GO

EXEC dev.uspDropDefaultConstraint @pTableName = 'T_DKT_FELADAT', @pColumnName = 'C_LATHATOSAGIDOPONT'
GO

EXEC dev.uspDropDefaultConstraint @pTableName = 'T_DKT_FELADAT', @pColumnName = 'C_BEADASHATARIDO'
GO


ALTER TABLE T_DKT_FELADAT ALTER COLUMN C_LATHATOSAGIDOPONT datetime NULL
GO
ALTER TABLE T_DKT_FELADAT ALTER COLUMN C_BEADASHATARIDO datetime NULL
GO

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

