Skip to content

FleetRolloutService — 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.Rollouts

Owner: Rollout · Retention: lifetime of the product plus 7 years for evidence

CREATE TABLE [dbo].[Rollouts] (
    [RolloutId] uniqueidentifier NOT NULL,
    [TenantId] nvarchar(64) NOT NULL,
    [ProductId] nvarchar(128) NOT NULL,
    [Kind] int NOT NULL,
    [TargetReleaseId] uniqueidentifier NULL,
    [TargetAssetReleaseId] nvarchar(256) NULL,
    [SourceRunId] uniqueidentifier NULL,
    [WavesJson] nvarchar(max) NOT NULL,
    [GuardsJson] nvarchar(2000) NOT NULL,
    [ApprovalId] uniqueidentifier NULL,
    [State] int NOT NULL,
    [CurrentWave] int NOT NULL DEFAULT (0),
    [RequestedBy] nvarchar(256) NOT NULL,
    [StartedAt] datetimeoffset NULL,
    [CompletedAt] datetimeoffset NULL,
    CONSTRAINT [PK_Rollouts] PRIMARY KEY ([RolloutId])
);
CREATE INDEX [IX_Rollouts_Product_State] ON [dbo].[Rollouts] ([TenantId], [ProductId], [State]);
Column Type Null Key Description
RolloutId uniqueidentifier no PK
TenantId nvarchar(64) no
ProductId nvarchar(128) no
Kind int no
TargetReleaseId uniqueidentifier yes
TargetAssetReleaseId nvarchar(256) yes
SourceRunId uniqueidentifier yes
WavesJson nvarchar(max) no
GuardsJson nvarchar(2000) no
ApprovalId uniqueidentifier yes
State int no
CurrentWave int no
RequestedBy nvarchar(256) no
StartedAt datetimeoffset yes
CompletedAt datetimeoffset yes

dbo.RolloutWaves

Owner: RolloutWave

CREATE TABLE [dbo].[RolloutWaves] (
    [RolloutId] uniqueidentifier NOT NULL,
    [Index] int NOT NULL,
    [TenantId] nvarchar(64) NOT NULL,
    [InstanceIdsJson] nvarchar(max) NOT NULL,
    [PromotionIdsJson] nvarchar(max) NOT NULL,
    [BakeMinutes] int NOT NULL,
    [State] int NOT NULL,
    [StartedAt] datetimeoffset NULL,
    [CompletedAt] datetimeoffset NULL,
    CONSTRAINT [PK_RolloutWaves] PRIMARY KEY ([RolloutId], [Index])
);
ALTER TABLE [dbo].[RolloutWaves] ADD CONSTRAINT [FK_RolloutWaves_Rollouts_RolloutId] FOREIGN KEY ([RolloutId]) REFERENCES [dbo].[Rollouts] ([RolloutId]);
Column Type Null Key Description
RolloutId uniqueidentifier no PK FK → Rollouts.RolloutId
Index int no PK
TenantId nvarchar(64) no
InstanceIdsJson nvarchar(max) no
PromotionIdsJson nvarchar(max) no
BakeMinutes int no
State int no
StartedAt datetimeoffset yes
CompletedAt datetimeoffset yes