Tables [dbo].[SakariIncomingMessage]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created8:43:58 AM Thursday, December 5, 2024
Last Modified8:48:04 AM Thursday, December 5, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_SakariIncomingMessageID: SakariIncomingMessageIDSakariIncomingMessageIDint4
No
1 - 1
Foreign Keys FK_SakariIncomingMessage_SakariConversation: [dbo].[SakariConversation].SakariConversationFIDSakariConversationFIDint4
No
Cluster Key IX_SakariInomingMessage_SakariContactFID_MessageID: SakariContactFID\MessageIDForeign Keys FK_SakariIncomingMessage_SakariContact: [dbo].[SakariContact].SakariContactFIDSakariContactFIDint4
No
TextMessagenvarchar(max)max
No
CreatedAtdatetimeoffset10
No
ImportedIntoMssAtdatetimeoffset10
No
Cluster Key IX_SakariInomingMessage_SakariContactFID_MessageID: SakariContactFID\MessageIDMessageIDvarchar(32)32
No
Indexes Indexes
NameColumnsUnique
Primary Key PK_SakariIncomingMessageID: SakariIncomingMessageIDPK_SakariIncomingMessageIDSakariIncomingMessageID
Yes
Cluster Key IX_SakariInomingMessage_SakariContactFID_MessageID: SakariContactFID\MessageIDIX_SakariInomingMessage_SakariContactFID_MessageIDSakariContactFID, MessageID
Yes
Foreign Keys Foreign Keys
NameColumns
FK_SakariIncomingMessage_SakariContactSakariContactFID->[dbo].[SakariContact].[SakariContactID]
FK_SakariIncomingMessage_SakariConversationSakariConversationFID->[dbo].[SakariConversation].[SakariConversationID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[SakariIncomingMessage]
(
[SakariIncomingMessageID] [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,
[ImportedIntoMssAt] [datetimeoffset] NOT NULL,
[MessageID] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[SakariIncomingMessage] ADD CONSTRAINT [PK_SakariIncomingMessageID] PRIMARY KEY NONCLUSTERED  ([SakariIncomingMessageID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SakariIncomingMessage] ADD CONSTRAINT [IX_SakariInomingMessage_SakariContactFID_MessageID] UNIQUE CLUSTERED  ([SakariContactFID], [MessageID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SakariIncomingMessage] ADD CONSTRAINT [FK_SakariIncomingMessage_SakariContact] FOREIGN KEY ([SakariContactFID]) REFERENCES [dbo].[SakariContact] ([SakariContactID])
GO
ALTER TABLE [dbo].[SakariIncomingMessage] ADD CONSTRAINT [FK_SakariIncomingMessage_SakariConversation] FOREIGN KEY ([SakariConversationFID]) REFERENCES [dbo].[SakariConversation] ([SakariConversationID])
GO
GRANT SELECT ON  [dbo].[SakariIncomingMessage] TO [MssExec]
GRANT INSERT ON  [dbo].[SakariIncomingMessage] TO [MssExec]
GRANT DELETE ON  [dbo].[SakariIncomingMessage] TO [MssExec]
GRANT UPDATE ON  [dbo].[SakariIncomingMessage] TO [MssExec]
GO
Uses
Used By