﻿SET IDENTITY_INSERT [T_CONFIGTIPUS] ON
---------------------------------------
INSERT INTO T_CONFIGTIPUS ([ID], [C_CONFIG], [C_MODUL], [TOROLT], [SERIAL], [LASTCHANGED], [CREATED], [MODIFIER], [CREATOR], [ELOZOTANEVIREKORDID])
VALUES
	(10, 'IsEnabled', 'eJelentkezes', 'F', 0, GETDATE(), GETDATE(), 0, 0, NULL)
	,(11, 'Url', 'eJelentkezes', 'F', 0, GETDATE(), GETDATE(), 0, 0, NULL)
---------------------------------------
SET IDENTITY_INSERT [T_CONFIGTIPUS] OFF

DECLARE @EnvironmentName nvarchar(1000)
	SET @EnvironmentName = (SELECT TOP 1 [Value] FROM dev.EnvironmentInfo WHERE [Key] = 'Kornyezet')

DECLARE @eJelentkezesUrl nvarchar(255) = CASE @EnvironmentName
  WHEN 'AZURE' THEN ''
  WHEN 'HOI' THEN '' 
  WHEN 'KK' THEN ''
  WHEN 'NSZFH' THEN 'https://kretaadmin.e-kreta.hu/sso'
  WHEN 'NSZFH-EMA' THEN ''
END

DECLARE @eJelentkezesIsEnabled nvarchar(255) = 'false'

INSERT INTO T_INTEZMENYCONFIG ([C_ERTEK], [C_CONFIGTIPUSID], [C_INTEZMENYID], [TOROLT], [SERIAL], [LASTCHANGED], [CREATED], [MODIFIER], [CREATOR], [ELOZOTANEVIREKORDID])
	SELECT @eJelentkezesIsEnabled, 10, i.ID, 'F', 0, GETDATE(), GETDATE(), 0, 0, NULL FROM T_INTEZMENY i WHERE i.TOROLT = 'F'
​
INSERT INTO T_INTEZMENYCONFIG ([C_ERTEK], [C_CONFIGTIPUSID], [C_INTEZMENYID], [TOROLT], [SERIAL], [LASTCHANGED], [CREATED], [MODIFIER], [CREATOR], [ELOZOTANEVIREKORDID])
	SELECT @eJelentkezesUrl, 11, i.ID, 'F', 0, GETDATE(), GETDATE(), 0, 0, NULL FROM T_INTEZMENY i WHERE i.TOROLT = 'F'
