[dbo].[MobileCrewTimeSentToXmlInterface]
CREATE TABLE [dbo].[MobileCrewTimeSentToXmlInterface]
(
[MobileCrewTimeSentToXmlInterfaceID] [bigint] NOT NULL IDENTITY(1, 1),
[MobileCrewTimeFID] [bigint] NOT NULL,
[XmlInterfaceFID] [int] NOT NULL,
[IsBeginTime] [bit] NOT NULL,
[SentOn] [datetime] NOT NULL,
[SentByFID] [int] NOT NULL,
[AccountCodeSentToInterface] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[AdjustedPunchTime] [datetime] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MobileCrewTimeSentToXmlInterface] ADD CONSTRAINT [PK_MobileCrewTimeSentToXmlInterface] PRIMARY KEY NONCLUSTERED ([MobileCrewTimeSentToXmlInterfaceID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MobileCrewTimeSentToXmlInterface] ADD CONSTRAINT [IX_MobileCrewTimeSentToXmlInterface_XmlInterfaceFID_MobileCrewTimeFID_IsBeginTime] UNIQUE NONCLUSTERED ([XmlInterfaceFID], [MobileCrewTimeFID], [IsBeginTime]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_MobileCrewTimeSentToXmlInterface_MobileCrewTimeFID_XmlInterfaceFID_IsBeginTime] ON [dbo].[MobileCrewTimeSentToXmlInterface] ([MobileCrewTimeFID], [XmlInterfaceFID], [IsBeginTime]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MobileCrewTimeSentToXmlInterface] ADD CONSTRAINT [FK_MobileCrewTimeSentToXmlInterface_MobileCrewTimeFID] FOREIGN KEY ([MobileCrewTimeFID]) REFERENCES [dbo].[MobileCrewTime] ([MobileCrewTimeID])
GO
ALTER TABLE [dbo].[MobileCrewTimeSentToXmlInterface] ADD CONSTRAINT [FK_MobileCrewTimeSentToXmlInterface_SentByFID] FOREIGN KEY ([SentByFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[MobileCrewTimeSentToXmlInterface] ADD CONSTRAINT [FK_MobileCrewTimeSentToXmlInterface_XmlInterfaceFID] FOREIGN KEY ([XmlInterfaceFID]) REFERENCES [dbo].[XmlInterface] ([XmlInterfaceID])
GO
GRANT SELECT ON [dbo].[MobileCrewTimeSentToXmlInterface] TO [MssExec]
GRANT INSERT ON [dbo].[MobileCrewTimeSentToXmlInterface] TO [MssExec]
GRANT DELETE ON [dbo].[MobileCrewTimeSentToXmlInterface] TO [MssExec]
GRANT UPDATE ON [dbo].[MobileCrewTimeSentToXmlInterface] TO [MssExec]
GO