
[dbo].[ActiveSubscriptions]
CREATE TABLE [dbo].[ActiveSubscriptions]
(
[ActiveID] [uniqueidentifier] NOT NULL,
[SubscriptionID] [uniqueidentifier] NOT NULL,
[TotalNotifications] [int] NULL,
[TotalSuccesses] [int] NOT NULL,
[TotalFailures] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ActiveSubscriptions] ADD CONSTRAINT [PK_ActiveSubscriptions] PRIMARY KEY CLUSTERED ([ActiveID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ActiveSubscriptions] WITH NOCHECK ADD CONSTRAINT [FK_ActiveSubscriptions_Subscriptions] FOREIGN KEY ([SubscriptionID]) REFERENCES [dbo].[Subscriptions] ([SubscriptionID]) ON DELETE CASCADE
GO
GRANT REFERENCES ON [dbo].[ActiveSubscriptions] TO [RSExecRole]
GRANT SELECT ON [dbo].[ActiveSubscriptions] TO [RSExecRole]
GRANT INSERT ON [dbo].[ActiveSubscriptions] TO [RSExecRole]
GRANT DELETE ON [dbo].[ActiveSubscriptions] TO [RSExecRole]
GRANT UPDATE ON [dbo].[ActiveSubscriptions] TO [RSExecRole]
GO