Tables [dbo].[CrewSMSActivity]
Properties
PropertyValue
HeapYes
Row Count (~)0
Created9:00:16 AM Friday, November 22, 2024
Last Modified9:00:19 AM Friday, November 22, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Primary Key PK_CrewSMSActivity: CrewSMSActivityIDCrewSMSActivityIDint4
No
1 - 1
Foreign Keys FK_CrewSMSActivity_SakariContact: [dbo].[SakariContact].SakariContactFIDIndexes IX_CrewSMSActivity_LocServFID_SysuserFID_SakariContactFID: LocServFID\SysuserFID\SakariContactFIDSakariContactFIDint4
No
Foreign Keys FK_CrewSMSActivity_LocServ: [dbo].[LocServ].LocServFIDIndexes IX_CrewSMSActivity_LocServFID_SysuserFID_SakariContactFID: LocServFID\SysuserFID\SakariContactFIDLocServFIDint4
No
Foreign Keys FK_CrewSMSActivity_Sysuser: [dbo].[Sysuser].SysuserFIDIndexes IX_CrewSMSActivity_LocServFID_SysuserFID_SakariContactFID: LocServFID\SysuserFID\SakariContactFIDSysuserFIDint4
No
Indexes IX_CrewSMSActivity_LastOutgoingMessageSentAt: LastOutgoingMessageSentAtLastOutgoingMessageSentAtdatetimeoffset10
No
Foreign Keys FK_CrewSMSActivity_SakariIncomingMessage: [dbo].[SakariIncomingMessage].SakariIncomingMessageFIDSakariIncomingMessageFIDint4
Yes
Foreign Keys FK_CrewSMSActivity_SakariOutgoingMessage: [dbo].[SakariOutgoingMessage].SakariOutgoingMessageFIDSakariOutgoingMessageFIDint4
Yes
RemovedFromServiceMessageSentbit1
No
((0))
IsResendbit1
No
((0))
Indexes Indexes
NameColumnsUnique
Primary Key PK_CrewSMSActivity: CrewSMSActivityIDPK_CrewSMSActivityCrewSMSActivityID
Yes
IX_CrewSMSActivity_LastOutgoingMessageSentAtLastOutgoingMessageSentAt
IX_CrewSMSActivity_LocServFID_SysuserFID_SakariContactFIDLocServFID, SysuserFID, SakariContactFID
Foreign Keys Foreign Keys
NameColumns
FK_CrewSMSActivity_LocServLocServFID->[dbo].[LocServ].[PriKey]
FK_CrewSMSActivity_SakariContactSakariContactFID->[dbo].[SakariContact].[SakariContactID]
FK_CrewSMSActivity_SakariIncomingMessageSakariIncomingMessageFID->[dbo].[SakariIncomingMessage].[SakariIncomingMessageID]
FK_CrewSMSActivity_SakariOutgoingMessageSakariOutgoingMessageFID->[dbo].[SakariOutgoingMessage].[SakariOutgoingMessageID]
FK_CrewSMSActivity_SysuserSysuserFID->[dbo].[Sysuser].[SysUserID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[CrewSMSActivity]
(
[CrewSMSActivityID] [int] NOT NULL IDENTITY(1, 1),
[SakariContactFID] [int] NOT NULL,
[LocServFID] [int] NOT NULL,
[SysuserFID] [int] NOT NULL,
[LastOutgoingMessageSentAt] [datetimeoffset] NOT NULL,
[SakariIncomingMessageFID] [int] NULL,
[SakariOutgoingMessageFID] [int] NULL,
[RemovedFromServiceMessageSent] [bit] NOT NULL CONSTRAINT [DF_CrewSMSActivity_RemovedFromServiceMessage] DEFAULT ((0)),
[IsResend] [bit] NOT NULL CONSTRAINT [DF_CrewSMSActivity_IsResend] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CrewSMSActivity] ADD CONSTRAINT [PK_CrewSMSActivity] PRIMARY KEY NONCLUSTERED  ([CrewSMSActivityID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_CrewSMSActivity_LastOutgoingMessageSentAt] ON [dbo].[CrewSMSActivity] ([LastOutgoingMessageSentAt]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_CrewSMSActivity_LocServFID_SysuserFID_SakariContactFID] ON [dbo].[CrewSMSActivity] ([LocServFID], [SysuserFID], [SakariContactFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CrewSMSActivity] ADD CONSTRAINT [FK_CrewSMSActivity_LocServ] FOREIGN KEY ([LocServFID]) REFERENCES [dbo].[LocServ] ([PriKey])
GO
ALTER TABLE [dbo].[CrewSMSActivity] ADD CONSTRAINT [FK_CrewSMSActivity_SakariContact] FOREIGN KEY ([SakariContactFID]) REFERENCES [dbo].[SakariContact] ([SakariContactID])
GO
ALTER TABLE [dbo].[CrewSMSActivity] ADD CONSTRAINT [FK_CrewSMSActivity_SakariIncomingMessage] FOREIGN KEY ([SakariIncomingMessageFID]) REFERENCES [dbo].[SakariIncomingMessage] ([SakariIncomingMessageID])
GO
ALTER TABLE [dbo].[CrewSMSActivity] ADD CONSTRAINT [FK_CrewSMSActivity_SakariOutgoingMessage] FOREIGN KEY ([SakariOutgoingMessageFID]) REFERENCES [dbo].[SakariOutgoingMessage] ([SakariOutgoingMessageID])
GO
ALTER TABLE [dbo].[CrewSMSActivity] ADD CONSTRAINT [FK_CrewSMSActivity_Sysuser] FOREIGN KEY ([SysuserFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
GRANT SELECT ON  [dbo].[CrewSMSActivity] TO [MssExec]
GRANT INSERT ON  [dbo].[CrewSMSActivity] TO [MssExec]
GRANT DELETE ON  [dbo].[CrewSMSActivity] TO [MssExec]
GRANT UPDATE ON  [dbo].[CrewSMSActivity] TO [MssExec]
GO
Uses