IF NOT EXISTS (SELECT Name FROM SysIndexes  WITH (NOLOCK) WHERE Name = 'IX_ArrangementLinesDeleted_LineNumber')
CREATE NONCLUSTERED INDEX [IX_ArrangementLinesDeleted_LineNumber] ON [dbo].[ArrangementLinesDeleted]
(
	[LineNumber] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO

IF NOT EXISTS (SELECT Name FROM SysIndexes  WITH (NOLOCK) WHERE Name = 'IX_ArrangementLinesDeleted_ReferenceNumberGuestNumber')
CREATE NONCLUSTERED INDEX [IX_ArrangementLinesDeleted_ReferenceNumberGuestNumber] ON [dbo].[ArrangementLinesDeleted]
(
	[ReferenceNumber] ASC,
	[GuestNumber] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO

IF NOT EXISTS (SELECT Name FROM SysIndexes  WITH (NOLOCK) WHERE Name = 'IX_ArrangementLinesDepDeleted_Remove')
CREATE NONCLUSTERED INDEX [IX_ArrangementLinesDepDeleted_Remove] ON [dbo].[ArrangementLinesDepDeleted]
(
	[ReferenceNumber] ASC,
	[GuestNumber] ASC,
	[Date] ASC,
	[Time] ASC,
	[DepartureTime] ASC,
	[PacketItemNumber] ASC,
	[WareNumber] ASC,
	[Price] ASC,
	[PacketItemTime] ASC,
	[FK_DepartmentNumber] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO