Skip to content

StoreProfileService — 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.StoreProfiles

Owner: StoreProfile

CREATE TABLE [dbo].[StoreProfiles] (
    [ProfileId] nvarchar(64) NOT NULL,
    [Topology] nvarchar(32) NOT NULL,
    [TenantId] nvarchar(64) NOT NULL,
    [StoreClass] int NOT NULL,
    [Engine] nvarchar(32) NOT NULL,
    [AdapterLibrary] nvarchar(128) NOT NULL,
    [MigrationConvention] nvarchar(128) NOT NULL,
    [RpoMinutes] int NOT NULL,
    [RtoMinutes] int NOT NULL,
    [Encryption] nvarchar(32) NOT NULL,
    [Authoritative] bit NOT NULL,
    CONSTRAINT [PK_StoreProfiles] PRIMARY KEY ([ProfileId], [Topology])
);
Column Type Null Key Description
ProfileId nvarchar(64) no PK
Topology nvarchar(32) no PK
TenantId nvarchar(64) no
StoreClass int no
Engine nvarchar(32) no
AdapterLibrary nvarchar(128) no
MigrationConvention nvarchar(128) no
RpoMinutes int no
RtoMinutes int no
Encryption nvarchar(32) no
Authoritative bit no

dbo.StoreBindings

Owner: StoreBinding

CREATE TABLE [dbo].[StoreBindings] (
    [StoreId] nvarchar(64) NOT NULL,
    [TenantId] nvarchar(64) NOT NULL,
    [OwnerService] nvarchar(96) NOT NULL,
    [ProfileId] nvarchar(64) NOT NULL,
    [Region] nvarchar(32) NOT NULL,
    [KeyReference] nvarchar(256) NOT NULL,
    [State] int NOT NULL,
    [SchemasJson] nvarchar(1024) NOT NULL,
    CONSTRAINT [PK_StoreBindings] PRIMARY KEY ([StoreId], [TenantId])
);
CREATE INDEX [IX_Bindings_Owner] ON [dbo].[StoreBindings] ([OwnerService]);
CREATE INDEX [IX_Bindings_Region] ON [dbo].[StoreBindings] ([Region], [State]);
Column Type Null Key Description
StoreId nvarchar(64) no PK
TenantId nvarchar(64) no PK
OwnerService nvarchar(96) no
ProfileId nvarchar(64) no
Region nvarchar(32) no
KeyReference nvarchar(256) no
State int no
SchemasJson nvarchar(1024) no