﻿--Migration
IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE name = 'NCI_Csoport_AlintezmenyId_AltanevId') BEGIN
	CREATE INDEX NCI_Tanulo_AlintezmenyId_AltanevId 
	  ON T_TANULO (C_ALINTEZMENYID, C_ALTANEVID) 
	  WHERE TOROLT = 'F'
	WITH (FILLFACTOR = 80)
END
GO

IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE name = 'NCI_Csoport_AlintezmenyId_AltanevId') BEGIN
	CREATE INDEX NCI_FelhasznaloBelepes_FelhasznaloIdIntezmenyId_TanevId 
	  ON T_FELHASZNALOBELEPES (C_FELHASZNALOID, C_INTEZMENYID, C_TANEVID) 
	  INCLUDE(C_GONDVISELOID) 
	  WHERE TOROLT = 'F'
	WITH (FILLFACTOR = 80)
END
GO

IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE name = 'NCI_Csoport_AlintezmenyId_AltanevId') BEGIN
	CREATE INDEX NCI_Csoport_AlintezmenyId_AltanevId 
	  ON T_CSOPORT (C_ALINTEZMENYID, C_ALTANEVID) 
	  INCLUDE(C_OSZTALYBONTASID, C_TIPUSA) 
	  WHERE TOROLT = 'F'
	WITH (FILLFACTOR = 80)
END
GO