diff --git a/DNN Platform/Website/Providers/DataProviders/SqlDataProvider/09.05.00.SqlDataProvider b/DNN Platform/Website/Providers/DataProviders/SqlDataProvider/09.05.00.SqlDataProvider new file mode 100644 index 00000000000..1928f9a5005 --- /dev/null +++ b/DNN Platform/Website/Providers/DataProviders/SqlDataProvider/09.05.00.SqlDataProvider @@ -0,0 +1,23 @@ +/************************************************************/ +/***** SqlDataProvider *****/ +/***** *****/ +/***** *****/ +/***** Note: To manually execute this script you must *****/ +/***** perform a search and replace operation *****/ +/***** for {databaseOwner} and {objectQualifier} *****/ +/***** *****/ +/************************************************************/ + +IF NOT EXISTS (SELECT 1 FROM sys.indexes + WHERE object_id = OBJECT_ID(N'{databaseOwner}[{objectQualifier}CoreMessaging_MessageRecipients]') + AND name = N'IX_{objectQualifier}CoreMessaging_MessageRecipients_ForDispatch') + CREATE NONCLUSTERED INDEX [IX_{objectQualifier}CoreMessaging_MessageRecipients_ForDispatch] + ON {databaseOwner}[{objectQualifier}CoreMessaging_MessageRecipients] ([EmailSchedulerInstance]) + INCLUDE ([EmailSent], [Read], [Archived], [EmailSentDate], [RecipientID], [MessageID], [UserID], [CreatedByUserID], [CreatedOnDate], [LastModifiedByUserID], [LastModifiedOnDate], [SendToast]) + WHERE EmailSent = 0 AND [Read] = 0 AND Archived = 0; +GO + +/************************************************************/ +/***** SqlDataProvider *****/ +/************************************************************/ +/************************************************************/