IF NOT EXISTS (SELECT Name FROM SysIndexes  WITH (NOLOCK) WHERE Name = 'IX_ArrangementLinesDepDeletedArrangementLineNumber')
CREATE NONCLUSTERED INDEX [IX_ArrangementLinesDepDeletedArrangementLineNumber] ON [dbo].[ArrangementLinesDepDeleted]
(
	[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_ArrangementLinesDepDeletedRefGuestNo')
CREATE NONCLUSTERED INDEX [IX_ArrangementLinesDepDeletedRefGuestNo] ON [dbo].[ArrangementLinesDepDeleted]
(
	[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
