File tree Expand file tree Collapse file tree 2 files changed +29
-2
lines changed
SqlTransactionalOutbox.SqlServer.Common/_SqlScript Expand file tree Collapse file tree 2 files changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,34 @@ the values you need.
6565 });
6666```
6767
68+ ## Database Schema:
69+ The schema used for the SQL Server implementation is as follows. This is also stored in the project here:
70+ (SqlTransactionalOutbox.SqlServer.Common => _ SqlScript => TransactionalOutboxSqlScript.sql)
71+ [ https://github.com/cajuncoding/SqlTransactionalOutbox/blob/main/SqlTransactionalOutbox.SqlServer.Common/_SqlScript/TransactionalOutboxSqlScript.sql ]
72+ ``` sql
73+ CREATE SCHEMA notifications ;
74+ GO
75+
76+ -- DROP TABLE [notifications].[TransactionalOutboxQueue];
77+ CREATE TABLE [notifications].[TransactionalOutboxQueue] (
78+ [Id] INT IDENTITY NOT NULL PRIMARY KEY ,
79+ [UniqueIdentifier] UNIQUEIDENTIFIER NOT NULL ,
80+ [FifoGroupingIdentifier] VARCHAR (200 ) NULL ,
81+ [Status] VARCHAR (50 ) NOT NULL ,
82+ [CreatedDateTimeUtc] DATETIME2 NOT NULL DEFAULT SysUtcDateTime(),
83+ [PublishAttempts] INT NOT NULL DEFAULT 0 ,
84+ [PublishTarget] VARCHAR (200 ) NOT NULL , -- Topic and/or Queue name
85+ [Payload] NVARCHAR(MAX), -- Generic Payload supporting Implementation specific processing (e.g. Json)
86+ );
87+ GO
88+
89+ CREATE NONCLUSTERED INDEX [IDX_TransactionalOutboxQueue_UniqueIdentifier] ON [notifications].[TransactionalOutboxQueue] ([UniqueIdentifier]);
90+ GO
91+
92+ CREATE NONCLUSTERED INDEX [IDX_TransactionalOutboxQueue_Status] ON [notifications].[TransactionalOutboxQueue] ([Status]);
93+ GO
94+ ```
95+
6896## Documentation TODOs:
6997Provide documentation for:
7098 - Transactional Outbox Pattern summary/overview
Original file line number Diff line number Diff line change 22GO
33
44-- DROP TABLE [notifications].[TransactionalOutboxQueue];
5-
65CREATE TABLE [notifications].[TransactionalOutboxQueue] (
76 [Id] INT IDENTITY NOT NULL PRIMARY KEY ,
87 [UniqueIdentifier] UNIQUEIDENTIFIER NOT NULL ,
@@ -11,7 +10,7 @@ CREATE TABLE [notifications].[TransactionalOutboxQueue] (
1110 [CreatedDateTimeUtc] DATETIME2 NOT NULL DEFAULT SysUtcDateTime (),
1211 [PublishAttempts] INT NOT NULL DEFAULT 0 ,
1312 [PublishTarget] VARCHAR (200 ) NOT NULL , -- Topic and/or Queue name
14- [Payload] NVARCHAR (MAX ), -- Payload genercially processed by an implementation (e.g. Json)
13+ [Payload] NVARCHAR (MAX ), -- Generic Payload supporting Implementation specific processing (e.g. Json)
1514);
1615GO
1716
You can’t perform that action at this time.
0 commit comments