-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdatabasescript.sql
More file actions
23 lines (22 loc) · 908 Bytes
/
Copy pathdatabasescript.sql
File metadata and controls
23 lines (22 loc) · 908 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--CHANGE NAMES ACCORDINGLY
CREATE TABLE [Playground].[Outbox]
(
[Id] [bigint] NOT NULL IDENTITY(1, 1),
[EventId] [nvarchar] (200) NOT NULL,
[Body] [ntext] NOT NULL,
[Exchange] [nvarchar] (1000) NOT NULL,
[StatusId] [tinyint] NOT NULL,
[BrokerTypeId] [BIGINT] NULL,
[PickedDate] [datetime2] NULL,
[DeliveredDate] [datetime2] NULL,
[DeliveryCount] [tinyint] NULL,
[CreatedBy] [nvarchar] (200) NULL,
[CreatedDate] [datetime2] (3) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [Playground].[Outbox] ADD CONSTRAINT [PK_Playground_Outbox] PRIMARY KEY CLUSTERED ([Id]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [NCIX_Playground_Outbox_StatusId_PickedDate] ON [Playground].[Outbox] ([StatusId], [PickedDate]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [NCIX_Playground_Outbox_Exchange_EventId] ON [Playground].[Outbox] ([Exchange], [EventId]) ON [PRIMARY]
GO