Tables [dbo].[CrewSMSServiceDetailsSnapshot]
Properties
PropertyValue
HeapYes
Row Count (~)0
Created9:12:59 AM Friday, November 8, 2024
Last Modified9:13:02 AM Friday, November 8, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_CrewSMSServiceDetailsSnapshot: CrewSMSServiceDetailsSnapshotIDCrewSMSServiceDetailsSnapshotIDint4
No
1 - 1
Foreign Keys FK_CrewSMSServiceDetailsSnapshot_LocServ: [dbo].[LocServ].LocServFIDIndexes IX_CrewSMSServiceDetailsSnapshot_LocServFID: LocServFIDIndexes IX_CrewSMSServiceDetailsSnapshot_LocServFID_SysuserFID: LocServFID\SysuserFIDLocServFIDint4
No
Foreign Keys FK_CrewSMSServiceDetailsSnapshot_Sysuser: [dbo].[Sysuser].SysuserFIDIndexes IX_CrewSMSServiceDetailsSnapshot_LocServFID_SysuserFID: LocServFID\SysuserFIDSysuserFIDint4
No
ServiceDatedatetime8
No
CrewReportTimedatetime8
Yes
CrewReportLocationFIDint4
Yes
Foreign Keys FK_CrewSMSServiceDetailsSnapshot_LaborType: [dbo].[LaborType].LaborTypeFIDLaborTypeFIDint4
No
StartTimedatetime8
Yes
EndTimedatetime8
Yes
Indexes Indexes
NameColumnsUnique
Primary Key PK_CrewSMSServiceDetailsSnapshot: CrewSMSServiceDetailsSnapshotIDPK_CrewSMSServiceDetailsSnapshotCrewSMSServiceDetailsSnapshotID
Yes
IX_CrewSMSServiceDetailsSnapshot_LocServFIDLocServFID
IX_CrewSMSServiceDetailsSnapshot_LocServFID_SysuserFIDLocServFID, SysuserFID
Foreign Keys Foreign Keys
NameColumns
FK_CrewSMSServiceDetailsSnapshot_LaborTypeLaborTypeFID->[dbo].[LaborType].[PriKey]
FK_CrewSMSServiceDetailsSnapshot_LocServLocServFID->[dbo].[LocServ].[PriKey]
FK_CrewSMSServiceDetailsSnapshot_SysuserSysuserFID->[dbo].[Sysuser].[SysUserID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[CrewSMSServiceDetailsSnapshot]
(
[CrewSMSServiceDetailsSnapshotID] [int] NOT NULL IDENTITY(1, 1),
[LocServFID] [int] NOT NULL,
[SysuserFID] [int] NOT NULL,
[ServiceDate] [datetime] NOT NULL,
[CrewReportTime] [datetime] NULL,
[CrewReportLocationFID] [int] NULL,
[LaborTypeFID] [int] NOT NULL,
[StartTime] [datetime] NULL,
[EndTime] [datetime] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CrewSMSServiceDetailsSnapshot] ADD CONSTRAINT [PK_CrewSMSServiceDetailsSnapshot] PRIMARY KEY NONCLUSTERED  ([CrewSMSServiceDetailsSnapshotID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_CrewSMSServiceDetailsSnapshot_LocServFID] ON [dbo].[CrewSMSServiceDetailsSnapshot] ([LocServFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_CrewSMSServiceDetailsSnapshot_LocServFID_SysuserFID] ON [dbo].[CrewSMSServiceDetailsSnapshot] ([LocServFID], [SysuserFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CrewSMSServiceDetailsSnapshot] ADD CONSTRAINT [FK_CrewSMSServiceDetailsSnapshot_LaborType] FOREIGN KEY ([LaborTypeFID]) REFERENCES [dbo].[LaborType] ([PriKey])
GO
ALTER TABLE [dbo].[CrewSMSServiceDetailsSnapshot] ADD CONSTRAINT [FK_CrewSMSServiceDetailsSnapshot_LocServ] FOREIGN KEY ([LocServFID]) REFERENCES [dbo].[LocServ] ([PriKey])
GO
ALTER TABLE [dbo].[CrewSMSServiceDetailsSnapshot] ADD CONSTRAINT [FK_CrewSMSServiceDetailsSnapshot_Sysuser] FOREIGN KEY ([SysuserFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
GRANT SELECT ON  [dbo].[CrewSMSServiceDetailsSnapshot] TO [MssExec]
GRANT INSERT ON  [dbo].[CrewSMSServiceDetailsSnapshot] TO [MssExec]
GRANT DELETE ON  [dbo].[CrewSMSServiceDetailsSnapshot] TO [MssExec]
GRANT UPDATE ON  [dbo].[CrewSMSServiceDetailsSnapshot] TO [MssExec]
GO
Uses