Tables [dbo].[AdminHistory]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created1:49:07 PM Wednesday, April 10, 2024
Last Modified1:49:07 PM Wednesday, April 10, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_AdminHistory: AdminHistoryIdAdminHistoryIdbigint8
No
1 - 1
Foreign Keys FK_AdminHistory_SysUser: [dbo].[Sysuser].ChangedByChangedByint4
No
Indexes IX_AdminHistory_ChangedOn: ChangedOnChangedOndatetime8
No
Foreign Keys FK_AdminHistory_AdminHistoryField: [dbo].[AdminHistoryField].AdminHistoryFieldFidAdminHistoryFieldFidint4
Yes
Foreign Keys FK_AdminHistory_AdminHistoryRecord: [dbo].[AdminHistoryRecord].AdminHistoryRecordFidAdminHistoryRecordFidbigint8
Yes
ChangedFromnvarchar(4000)8000
Yes
ChangedTonvarchar(4000)8000
Yes
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_AdminHistory: AdminHistoryIdPK_AdminHistoryAdminHistoryId
Yes
IX_AdminHistory_ChangedOnChangedOn
Foreign Keys Foreign Keys
NameColumns
FK_AdminHistory_AdminHistoryFieldAdminHistoryFieldFid->[dbo].[AdminHistoryField].[AdminHistoryFieldId]
FK_AdminHistory_AdminHistoryRecordAdminHistoryRecordFid->[dbo].[AdminHistoryRecord].[AdminHistoryRecordId]
FK_AdminHistory_SysUserChangedBy->[dbo].[Sysuser].[SysUserID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[AdminHistory]
(
[AdminHistoryId] [bigint] NOT NULL IDENTITY(1, 1),
[ChangedBy] [int] NOT NULL,
[ChangedOn] [datetime] NOT NULL,
[AdminHistoryFieldFid] [int] NULL,
[AdminHistoryRecordFid] [bigint] NULL,
[ChangedFrom] [nvarchar] (4000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ChangedTo] [nvarchar] (4000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AdminHistory] ADD CONSTRAINT [PK_AdminHistory] PRIMARY KEY CLUSTERED  ([AdminHistoryId]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_AdminHistory_ChangedOn] ON [dbo].[AdminHistory] ([ChangedOn] DESC) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AdminHistory] ADD CONSTRAINT [FK_AdminHistory_AdminHistoryField] FOREIGN KEY ([AdminHistoryFieldFid]) REFERENCES [dbo].[AdminHistoryField] ([AdminHistoryFieldId])
GO
ALTER TABLE [dbo].[AdminHistory] ADD CONSTRAINT [FK_AdminHistory_AdminHistoryRecord] FOREIGN KEY ([AdminHistoryRecordFid]) REFERENCES [dbo].[AdminHistoryRecord] ([AdminHistoryRecordId])
GO
ALTER TABLE [dbo].[AdminHistory] ADD CONSTRAINT [FK_AdminHistory_SysUser] FOREIGN KEY ([ChangedBy]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
GRANT SELECT ON  [dbo].[AdminHistory] TO [MssExec]
GRANT INSERT ON  [dbo].[AdminHistory] TO [MssExec]
GRANT DELETE ON  [dbo].[AdminHistory] TO [MssExec]
GRANT UPDATE ON  [dbo].[AdminHistory] TO [MssExec]
GO
Uses