[dbo].[AdminHistoryField]
CREATE TABLE [dbo].[AdminHistoryField]
(
[AdminHistoryFieldId] [int] NOT NULL IDENTITY(1, 1),
[AdminHistoryAdminRoleFid] [int] NOT NULL,
[AdminField] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AdminHistoryField] ADD CONSTRAINT [PK_AdminHistoryField] PRIMARY KEY CLUSTERED ([AdminHistoryFieldId]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AdminHistoryField] ADD CONSTRAINT [IX_AdminHistoryField_AdminHistoryAdminRole_AdminField] UNIQUE NONCLUSTERED ([AdminHistoryAdminRoleFid], [AdminField]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_AdminHistoryField_AdminHistoryAdminRoleFid_AdminField] ON [dbo].[AdminHistoryField] ([AdminHistoryAdminRoleFid], [AdminField]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AdminHistoryField] ADD CONSTRAINT [FK_AdminHistoryField_AdminHistoryAdminRole] FOREIGN KEY ([AdminHistoryAdminRoleFid]) REFERENCES [dbo].[AdminHistoryAdminRole] ([AdminHistoryAdminRoleId])
GO
GRANT SELECT ON [dbo].[AdminHistoryField] TO [MssExec]
GRANT INSERT ON [dbo].[AdminHistoryField] TO [MssExec]
GRANT DELETE ON [dbo].[AdminHistoryField] TO [MssExec]
GRANT UPDATE ON [dbo].[AdminHistoryField] TO [MssExec]
GO