[dbo].[ARCAlertGroupAlertMap]
CREATE TABLE [dbo].[ARCAlertGroupAlertMap]
(
[ARCAlertGroupFID] [int] NOT NULL,
[ARCAlertFID] [int] NOT NULL,
[ARCAlertGroupAlertMapID] [int] NOT NULL IDENTITY(1, 1)
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ARCAlertGroupAlertMap] ADD CONSTRAINT [PK_ARCAlertGroupAlertMap] PRIMARY KEY NONCLUSTERED ([ARCAlertGroupAlertMapID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ARCAlertGroupAlertMap] ADD CONSTRAINT [IX_ARCAlertGroupAlertMap_ARCAlertGroup_ARCAlert] UNIQUE NONCLUSTERED ([ARCAlertGroupFID], [ARCAlertFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ARCAlertGroupAlertMap] ADD CONSTRAINT [FK_ARCAlertGroupAlertMap_ARCAlert] FOREIGN KEY ([ARCAlertFID]) REFERENCES [dbo].[ARCAlert] ([ARCAlertID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[ARCAlertGroupAlertMap] ADD CONSTRAINT [FK_ARCAlertGroupAlertMap_ARCAlertGroup] FOREIGN KEY ([ARCAlertGroupFID]) REFERENCES [dbo].[ARCAlertGroup] ([ARCAlertGroupID]) ON DELETE CASCADE
GO
GRANT SELECT ON [dbo].[ARCAlertGroupAlertMap] TO [MssExec]
GRANT INSERT ON [dbo].[ARCAlertGroupAlertMap] TO [MssExec]
GRANT DELETE ON [dbo].[ARCAlertGroupAlertMap] TO [MssExec]
GRANT UPDATE ON [dbo].[ARCAlertGroupAlertMap] TO [MssExec]
GO