Skip to content

ReleaseService — 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.ProductReleases

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

CREATE TABLE [dbo].[ProductReleases] (
    [ReleaseId] uniqueidentifier NOT NULL,
    [TenantId] nvarchar(64) NOT NULL,
    [ProjectId] nvarchar(64) NOT NULL,
    [ProductId] nvarchar(128) NOT NULL,
    [Version] nvarchar(32) NOT NULL,
    [Commit] nvarchar(64) NOT NULL,
    [PipelineRunId] uniqueidentifier NOT NULL,
    [ProposalIdsJson] nvarchar(2000) NOT NULL,
    [GeneratedByJson] nvarchar(2000) NOT NULL,
    [SbomRef] nvarchar(512) NOT NULL,
    [AttestationRefsJson] nvarchar(2000) NOT NULL,
    [State] int NOT NULL,
    [NotesRef] nvarchar(512) NULL,
    [CreatedAt] datetimeoffset NOT NULL,
    CONSTRAINT [PK_ProductReleases] PRIMARY KEY ([ReleaseId])
);
CREATE UNIQUE INDEX [UX_Releases_Product_Version] ON [dbo].[ProductReleases] ([TenantId], [ProductId], [Version]);
CREATE INDEX [IX_Releases_State] ON [dbo].[ProductReleases] ([TenantId], [State]);
Column Type Null Key Description
ReleaseId uniqueidentifier no PK
TenantId nvarchar(64) no
ProjectId nvarchar(64) no
ProductId nvarchar(128) no
Version nvarchar(32) no
Commit nvarchar(64) no
PipelineRunId uniqueidentifier no
ProposalIdsJson nvarchar(2000) no
GeneratedByJson nvarchar(2000) no
SbomRef nvarchar(512) no
AttestationRefsJson nvarchar(2000) no
State int no
NotesRef nvarchar(512) yes
CreatedAt datetimeoffset no

dbo.ReleaseComponents

Owner: ReleaseComponent

CREATE TABLE [dbo].[ReleaseComponents] (
    [ReleaseId] uniqueidentifier NOT NULL,
    [Name] nvarchar(256) NOT NULL,
    [TenantId] nvarchar(64) NOT NULL,
    [Kind] int NOT NULL,
    [Digest] nvarchar(128) NOT NULL,
    [Target] nvarchar(256) NOT NULL,
    [Publication] int NOT NULL,
    [EvidenceRef] nvarchar(512) NULL,
    CONSTRAINT [PK_ReleaseComponents] PRIMARY KEY ([ReleaseId], [Name])
);
ALTER TABLE [dbo].[ReleaseComponents] ADD CONSTRAINT [FK_ReleaseComponents_ProductReleases_ReleaseId] FOREIGN KEY ([ReleaseId]) REFERENCES [dbo].[ProductReleases] ([ReleaseId]);
Column Type Null Key Description
ReleaseId uniqueidentifier no PK FK → ProductReleases.ReleaseId
Name nvarchar(256) no PK
TenantId nvarchar(64) no
Kind int no
Digest nvarchar(128) no
Target nvarchar(256) no
Publication int no
EvidenceRef nvarchar(512) yes