Tables [dbo].[MobileCrewTimeAudit]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created8:49:56 AM Friday, December 7, 2018
Last Modified7:27:03 PM Tuesday, June 11, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_MobileCrewTimeAudit: MobileCrewTimeAuditIDMobileCrewTimeAuditIDbigint8
No
1 - 1
Foreign Keys FK_MobileCrewTimeAudit_MobileCrewTimeFID: [dbo].[MobileCrewTime].MobileCrewTimeFIDIndexes IX_MobileCrewTimeAudit_MobileCrewTimeFID: MobileCrewTimeFIDMobileCrewTimeFIDbigint8
No
Actionvarchar(1)1
No
Foreign Keys FK_MobileCrewTimeAudit_SubmitterFID: [dbo].[Sysuser].SubmitterFIDIndexes IX_MobileCrewTimeAudit_SubmitterFID: SubmitterFIDSubmitterFIDint4
No
Sourcevarchar(1)1
No
TimeUtcdatetime8
No
TimeZonesmallint2
No
StartTimeUtcdatetime8
Yes
StartTimeZonesmallint2
Yes
EndTimeUtcdatetime8
Yes
EndTimeZonesmallint2
Yes
IsOverTimebit1
Yes
Commentvarchar(64)64
Yes
GpsLatitudeInfloat8
Yes
GpsLongitudeInfloat8
Yes
GpsLatitudeOutfloat8
Yes
GpsLongitudeOutfloat8
Yes
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_MobileCrewTimeAudit: MobileCrewTimeAuditIDPK_MobileCrewTimeAuditMobileCrewTimeAuditID
Yes
IX_MobileCrewTimeAudit_MobileCrewTimeFIDMobileCrewTimeFID
IX_MobileCrewTimeAudit_SubmitterFIDSubmitterFID
Foreign Keys Foreign Keys
NameColumns
FK_MobileCrewTimeAudit_MobileCrewTimeFIDMobileCrewTimeFID->[dbo].[MobileCrewTime].[MobileCrewTimeID]
FK_MobileCrewTimeAudit_SubmitterFIDSubmitterFID->[dbo].[Sysuser].[SysUserID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[MobileCrewTimeAudit]
(
[MobileCrewTimeAuditID] [bigint] NOT NULL IDENTITY(1, 1),
[MobileCrewTimeFID] [bigint] NOT NULL,
[Action] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[SubmitterFID] [int] NOT NULL,
[Source] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[TimeUtc] [datetime] NOT NULL,
[TimeZone] [smallint] NOT NULL,
[StartTimeUtc] [datetime] NULL,
[StartTimeZone] [smallint] NULL,
[EndTimeUtc] [datetime] NULL,
[EndTimeZone] [smallint] NULL,
[IsOverTime] [bit] NULL,
[Comment] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[GpsLatitudeIn] [float] NULL,
[GpsLongitudeIn] [float] NULL,
[GpsLatitudeOut] [float] NULL,
[GpsLongitudeOut] [float] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MobileCrewTimeAudit] ADD CONSTRAINT [PK_MobileCrewTimeAudit] PRIMARY KEY CLUSTERED  ([MobileCrewTimeAuditID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_MobileCrewTimeAudit_MobileCrewTimeFID] ON [dbo].[MobileCrewTimeAudit] ([MobileCrewTimeFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_MobileCrewTimeAudit_SubmitterFID] ON [dbo].[MobileCrewTimeAudit] ([SubmitterFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MobileCrewTimeAudit] ADD CONSTRAINT [FK_MobileCrewTimeAudit_MobileCrewTimeFID] FOREIGN KEY ([MobileCrewTimeFID]) REFERENCES [dbo].[MobileCrewTime] ([MobileCrewTimeID])
GO
ALTER TABLE [dbo].[MobileCrewTimeAudit] ADD CONSTRAINT [FK_MobileCrewTimeAudit_SubmitterFID] FOREIGN KEY ([SubmitterFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
GRANT SELECT ON  [dbo].[MobileCrewTimeAudit] TO [MssExec]
GRANT INSERT ON  [dbo].[MobileCrewTimeAudit] TO [MssExec]
GRANT DELETE ON  [dbo].[MobileCrewTimeAudit] TO [MssExec]
GRANT UPDATE ON  [dbo].[MobileCrewTimeAudit] TO [MssExec]
GO
Uses