Tables [dbo].[SakariOutgoingMessage]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created7:28:15 PM Thursday, August 29, 2024
Last Modified7:31:24 PM Thursday, August 29, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_SakariOutgoingMessageID: SakariOutgoingMessageIDSakariOutgoingMessageIDint4
No
1 - 1
Foreign Keys FK_SakariOutgoingMessage_SakariConversation: [dbo].[SakariConversation].SakariConversationFIDSakariConversationFIDint4
No
Cluster Key IX_SakariOutgoingMessage_SakariContactFID_MessageID: SakariContactFID\MessageIDForeign Keys FK_SakariOutgoingMessage_SakariContact: [dbo].[SakariContact].SakariContactFIDSakariContactFIDint4
No
TextMessagenvarchar(max)max
No
CreatedAtdatetimeoffset10
No
UpdatedAtdatetimeoffset10
No
UpdatedInMssAtdatetimeoffset10
No
Foreign Keys FK_SakariOutgoingMessage_Sysuser: [dbo].[Sysuser].SentBySentByint4
Yes
Foreign Keys FK_SakariOutgoingMessage_SakariMessageStatus: [dbo].[SakariMessageStatus].SakariMessageStatusFIDSakariMessageStatusFIDint4
No
Cluster Key IX_SakariOutgoingMessage_SakariContactFID_MessageID: SakariContactFID\MessageIDMessageIDvarchar(32)32
No
ErrorMessagevarchar(512)512
Yes
ErrorCodevarchar(16)16
Yes
Foreign Keys FK_SakariOutgoingMessage_SakariScheduledMessage: [dbo].[SakariScheduledMessage].SakariScheduledMessageFIDSakariScheduledMessageFIDint4
Yes
Indexes Indexes
NameColumnsUnique
Primary Key PK_SakariOutgoingMessageID: SakariOutgoingMessageIDPK_SakariOutgoingMessageIDSakariOutgoingMessageID
Yes
Cluster Key IX_SakariOutgoingMessage_SakariContactFID_MessageID: SakariContactFID\MessageIDIX_SakariOutgoingMessage_SakariContactFID_MessageIDSakariContactFID, MessageID
Yes
Foreign Keys Foreign Keys
NameColumns
FK_SakariOutgoingMessage_SakariContactSakariContactFID->[dbo].[SakariContact].[SakariContactID]
FK_SakariOutgoingMessage_SakariConversationSakariConversationFID->[dbo].[SakariConversation].[SakariConversationID]
FK_SakariOutgoingMessage_SakariMessageStatusSakariMessageStatusFID->[dbo].[SakariMessageStatus].[SakariMessageStatusID]
FK_SakariOutgoingMessage_SakariScheduledMessageSakariScheduledMessageFID->[dbo].[SakariScheduledMessage].[SakariScheduledMessageID]
FK_SakariOutgoingMessage_SysuserSentBy->[dbo].[Sysuser].[SysUserID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[SakariOutgoingMessage]
(
[SakariOutgoingMessageID] [int] NOT NULL IDENTITY(1, 1),
[SakariConversationFID] [int] NOT NULL,
[SakariContactFID] [int] NOT NULL,
[TextMessage] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CreatedAt] [datetimeoffset] NOT NULL,
[UpdatedAt] [datetimeoffset] NOT NULL,
[UpdatedInMssAt] [datetimeoffset] NOT NULL,
[SentBy] [int] NULL,
[SakariMessageStatusFID] [int] NOT NULL,
[MessageID] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ErrorMessage] [varchar] (512) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ErrorCode] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[SakariScheduledMessageFID] [int] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[SakariOutgoingMessage] ADD CONSTRAINT [PK_SakariOutgoingMessageID] PRIMARY KEY NONCLUSTERED  ([SakariOutgoingMessageID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SakariOutgoingMessage] ADD CONSTRAINT [IX_SakariOutgoingMessage_SakariContactFID_MessageID] UNIQUE CLUSTERED  ([SakariContactFID], [MessageID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SakariOutgoingMessage] ADD CONSTRAINT [FK_SakariOutgoingMessage_SakariContact] FOREIGN KEY ([SakariContactFID]) REFERENCES [dbo].[SakariContact] ([SakariContactID])
GO
ALTER TABLE [dbo].[SakariOutgoingMessage] ADD CONSTRAINT [FK_SakariOutgoingMessage_SakariConversation] FOREIGN KEY ([SakariConversationFID]) REFERENCES [dbo].[SakariConversation] ([SakariConversationID])
GO
ALTER TABLE [dbo].[SakariOutgoingMessage] ADD CONSTRAINT [FK_SakariOutgoingMessage_SakariMessageStatus] FOREIGN KEY ([SakariMessageStatusFID]) REFERENCES [dbo].[SakariMessageStatus] ([SakariMessageStatusID])
GO
ALTER TABLE [dbo].[SakariOutgoingMessage] ADD CONSTRAINT [FK_SakariOutgoingMessage_SakariScheduledMessage] FOREIGN KEY ([SakariScheduledMessageFID]) REFERENCES [dbo].[SakariScheduledMessage] ([SakariScheduledMessageID])
GO
ALTER TABLE [dbo].[SakariOutgoingMessage] ADD CONSTRAINT [FK_SakariOutgoingMessage_Sysuser] FOREIGN KEY ([SentBy]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
GRANT SELECT ON  [dbo].[SakariOutgoingMessage] TO [MssExec]
GRANT INSERT ON  [dbo].[SakariOutgoingMessage] TO [MssExec]
GRANT DELETE ON  [dbo].[SakariOutgoingMessage] TO [MssExec]
GRANT UPDATE ON  [dbo].[SakariOutgoingMessage] TO [MssExec]
GO
Uses
Used By