IF NOT EXISTS (SELECT Name FROM SysIndexes WITH (NOLOCK) WHERE Name = 'IX_Transactions_AnonymizeReservationAddress')
BEGIN
  CREATE NONCLUSTERED INDEX IX_Transactions_AnonymizeReservationAddress
  ON [dbo].[Transactions] ([ShowOnBillFlag],[MovedDeleted])
  INCLUDE ([FolioNumber])
END
GO

IF NOT EXISTS (SELECT Name FROM SysIndexes WITH (NOLOCK) WHERE Name = 'IX_ReservationAddress_AnonymizeReservationAddress')
BEGIN
  CREATE NONCLUSTERED INDEX IX_ReservationAddress_AnonymizeReservationAddress
  ON [dbo].[RESERVATIONADDRESS] ([ADDRESSTYPE],[AddressNumber])
  INCLUDE ([LINK],[AddressAnonymized],[DoAnonymize])
END
GO