Tables [dbo].[MSSDocumentArchiveHistory]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created7:35:56 PM Wednesday, February 28, 2024
Last Modified7:36:00 PM Wednesday, February 28, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Primary Key PK_MSSDocumentArchiveHistory: MSSDocumentArchiveHistoryIDMSSDocumentArchiveHistoryIDint4
No
1 - 1
Foreign Keys FK_MSSDocumentArchiveHistory_SysUser: [dbo].[Sysuser].SysUserFIDSysUserFIDint4
No
Cluster Key IX_MSSDocumentArchiveHistory_Date: DateDatedatetime8
No
IfTruePurgedElseArchivedbit1
No
NumberOfDocumentsAffectedint4
No
OrderNumbervarchar(32)32
Yes
OrderStatusvarchar(25)25
Yes
CreatedDateStartdate3
Yes
CreatedDateEnddate3
Yes
LoadDateStartdate3
Yes
LoadDateEnddate3
Yes
DeliveryDateStartdate3
Yes
DeliveryDateEnddate3
Yes
FromDatabase[sys].[sysname]256
Yes
ToDatabase[sys].[sysname]256
Yes
IncludeOnlyArchivedOrdersbit1
No
((0))
Indexes Indexes
NameColumnsUnique
Primary Key PK_MSSDocumentArchiveHistory: MSSDocumentArchiveHistoryIDPK_MSSDocumentArchiveHistoryMSSDocumentArchiveHistoryID
Yes
Cluster Key IX_MSSDocumentArchiveHistory_Date: DateIX_MSSDocumentArchiveHistory_DateDate
Foreign Keys Foreign Keys
NameDeleteColumns
FK_MSSDocumentArchiveHistory_SysUserCascadeSysUserFID->[dbo].[Sysuser].[SysUserID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[MSSDocumentArchiveHistory]
(
[MSSDocumentArchiveHistoryID] [int] NOT NULL IDENTITY(1, 1),
[SysUserFID] [int] NOT NULL,
[Date] [datetime] NOT NULL,
[IfTruePurgedElseArchived] [bit] NOT NULL,
[NumberOfDocumentsAffected] [int] NOT NULL,
[OrderNumber] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[OrderStatus] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CreatedDateStart] [date] NULL,
[CreatedDateEnd] [date] NULL,
[LoadDateStart] [date] NULL,
[LoadDateEnd] [date] NULL,
[DeliveryDateStart] [date] NULL,
[DeliveryDateEnd] [date] NULL,
[FromDatabase] [sys].[sysname] NULL,
[ToDatabase] [sys].[sysname] NULL,
[IncludeOnlyArchivedOrders] [bit] NOT NULL CONSTRAINT [DF_MSSDocumentArchiveHistory_IncludeOnlyArchivedOrders] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MSSDocumentArchiveHistory] ADD CONSTRAINT [PK_MSSDocumentArchiveHistory] PRIMARY KEY NONCLUSTERED  ([MSSDocumentArchiveHistoryID]) ON [PRIMARY]
GO
CREATE CLUSTERED INDEX [IX_MSSDocumentArchiveHistory_Date] ON [dbo].[MSSDocumentArchiveHistory] ([Date] DESC) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MSSDocumentArchiveHistory] ADD CONSTRAINT [FK_MSSDocumentArchiveHistory_SysUser] FOREIGN KEY ([SysUserFID]) REFERENCES [dbo].[Sysuser] ([SysUserID]) ON DELETE CASCADE
GO
GRANT SELECT ON  [dbo].[MSSDocumentArchiveHistory] TO [MssExec]
GRANT INSERT ON  [dbo].[MSSDocumentArchiveHistory] TO [MssExec]
GRANT DELETE ON  [dbo].[MSSDocumentArchiveHistory] TO [MssExec]
GRANT UPDATE ON  [dbo].[MSSDocumentArchiveHistory] TO [MssExec]
GO
Uses