FleetIncidentService — DDL appendix¶
Generated from the architecture model
This page is rendered from model/**/*.yaml by tools/docs_model during mkdocs build. Edit the YAML, not this page; hand-written design lives on the linked service, platform and plane pages.
Dialect shown: SQL Server (nvarchar, uniqueidentifier, datetimeoffset). Migrations are authored as FluentMigrator classes in the service's DatabaseModel.Migrations project; the TenantId column and the NHibernate tenant filter follow canonical ADR-0100 in SharedDb mode.
dbo.ProductIncidents¶
Owner: ProductIncident · Retention: 7 years
CREATE TABLE [dbo].[ProductIncidents] (
[IncidentId] uniqueidentifier NOT NULL,
[TenantId] nvarchar(64) NOT NULL,
[ProductId] nvarchar(128) NOT NULL,
[InstanceIdsJson] nvarchar(max) NOT NULL,
[Severity] int NOT NULL,
[State] int NOT NULL,
[Title] nvarchar(256) NOT NULL,
[LinkedAlertIdsJson] nvarchar(2000) NOT NULL,
[LinkedRolloutId] uniqueidentifier NULL,
[LinkedRunIdsJson] nvarchar(2000) NOT NULL,
[Responder] nvarchar(256) NULL,
[CustomerNotificationsJson] nvarchar(max) NOT NULL,
[ReviewRef] nvarchar(512) NULL,
[OpenedAt] datetimeoffset NOT NULL,
[ResolvedAt] datetimeoffset NULL,
CONSTRAINT [PK_ProductIncidents] PRIMARY KEY ([IncidentId])
);
CREATE INDEX [IX_Incidents_Product_State] ON [dbo].[ProductIncidents] ([TenantId], [ProductId], [State], [Severity]);
| Column | Type | Null | Key | Description |
|---|---|---|---|---|
IncidentId |
uniqueidentifier |
no | PK | |
TenantId |
nvarchar(64) |
no | ||
ProductId |
nvarchar(128) |
no | ||
InstanceIdsJson |
nvarchar(max) |
no | ||
Severity |
int |
no | ||
State |
int |
no | ||
Title |
nvarchar(256) |
no | ||
LinkedAlertIdsJson |
nvarchar(2000) |
no | ||
LinkedRolloutId |
uniqueidentifier |
yes | ||
LinkedRunIdsJson |
nvarchar(2000) |
no | ||
Responder |
nvarchar(256) |
yes | ||
CustomerNotificationsJson |
nvarchar(max) |
no | ||
ReviewRef |
nvarchar(512) |
yes | ||
OpenedAt |
datetimeoffset |
no | ||
ResolvedAt |
datetimeoffset |
yes |
dbo.IncidentTimeline¶
Owner: ProductIncident
CREATE TABLE [dbo].[IncidentTimeline] (
[IncidentId] uniqueidentifier NOT NULL,
[Sequence] int NOT NULL,
[TenantId] nvarchar(64) NOT NULL,
[Kind] nvarchar(32) NOT NULL,
[Summary] nvarchar(1024) NOT NULL,
[Reference] nvarchar(256) NULL,
[OccurredAt] datetimeoffset NOT NULL,
CONSTRAINT [PK_IncidentTimeline] PRIMARY KEY ([IncidentId], [Sequence])
);
ALTER TABLE [dbo].[IncidentTimeline] ADD CONSTRAINT [FK_IncidentTimeline_ProductIncidents_IncidentId] FOREIGN KEY ([IncidentId]) REFERENCES [dbo].[ProductIncidents] ([IncidentId]);
| Column | Type | Null | Key | Description |
|---|---|---|---|---|
IncidentId |
uniqueidentifier |
no | PK FK → ProductIncidents.IncidentId | |
Sequence |
int |
no | PK | |
TenantId |
nvarchar(64) |
no | ||
Kind |
nvarchar(32) |
no | ||
Summary |
nvarchar(1024) |
no | ||
Reference |
nvarchar(256) |
yes | ||
OccurredAt |
datetimeoffset |
no |
dbo.OnCallRecords¶
Owner: OnCallRecord
CREATE TABLE [dbo].[OnCallRecords] (
[RecordId] uniqueidentifier NOT NULL,
[TenantId] nvarchar(64) NOT NULL,
[ProductIdsJson] nvarchar(2000) NOT NULL,
[Edition] nvarchar(16) NOT NULL,
[Responder] nvarchar(256) NOT NULL,
[FromAt] datetimeoffset NOT NULL,
[ToAt] datetimeoffset NOT NULL,
[PagingConnectionId] uniqueidentifier NOT NULL,
CONSTRAINT [PK_OnCallRecords] PRIMARY KEY ([RecordId])
);
CREATE INDEX [IX_OnCall_Window] ON [dbo].[OnCallRecords] ([TenantId], [FromAt], [ToAt]);
| Column | Type | Null | Key | Description |
|---|---|---|---|---|
RecordId |
uniqueidentifier |
no | PK | |
TenantId |
nvarchar(64) |
no | ||
ProductIdsJson |
nvarchar(2000) |
no | ||
Edition |
nvarchar(16) |
no | ||
Responder |
nvarchar(256) |
no | ||
FromAt |
datetimeoffset |
no | ||
ToAt |
datetimeoffset |
no | ||
PagingConnectionId |
uniqueidentifier |
no |
dbo.Offboardings¶
Owner: Offboarding · Retention: 7 years
CREATE TABLE [dbo].[Offboardings] (
[OffboardingId] uniqueidentifier NOT NULL,
[TenantId] nvarchar(64) NOT NULL,
[ProductId] nvarchar(128) NOT NULL,
[CustomerTenantId] nvarchar(64) NULL,
[ApprovalId] uniqueidentifier NULL,
[ExportOrderId] uniqueidentifier NULL,
[HandoverAcknowledgedBy] nvarchar(256) NULL,
[DeletionOrderId] uniqueidentifier NULL,
[State] int NOT NULL,
[RequestedAt] datetimeoffset NOT NULL,
[CompletedAt] datetimeoffset NULL,
CONSTRAINT [PK_Offboardings] PRIMARY KEY ([OffboardingId])
);
CREATE INDEX [IX_Offboardings_Product_State] ON [dbo].[Offboardings] ([TenantId], [ProductId], [State]);
| Column | Type | Null | Key | Description |
|---|---|---|---|---|
OffboardingId |
uniqueidentifier |
no | PK | |
TenantId |
nvarchar(64) |
no | ||
ProductId |
nvarchar(128) |
no | ||
CustomerTenantId |
nvarchar(64) |
yes | ||
ApprovalId |
uniqueidentifier |
yes | ||
ExportOrderId |
uniqueidentifier |
yes | ||
HandoverAcknowledgedBy |
nvarchar(256) |
yes | ||
DeletionOrderId |
uniqueidentifier |
yes | ||
State |
int |
no | ||
RequestedAt |
datetimeoffset |
no | ||
CompletedAt |
datetimeoffset |
yes |