IdentityFlow.Tooling.Migrations 0.1.0-alpha.20260722083539

This is a prerelease version of IdentityFlow.Tooling.Migrations.
dotnet add package IdentityFlow.Tooling.Migrations --version 0.1.0-alpha.20260722083539
                    
NuGet\Install-Package IdentityFlow.Tooling.Migrations -Version 0.1.0-alpha.20260722083539
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="IdentityFlow.Tooling.Migrations" Version="0.1.0-alpha.20260722083539" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="IdentityFlow.Tooling.Migrations" Version="0.1.0-alpha.20260722083539" />
                    
Directory.Packages.props
<PackageReference Include="IdentityFlow.Tooling.Migrations" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add IdentityFlow.Tooling.Migrations --version 0.1.0-alpha.20260722083539
                    
#r "nuget: IdentityFlow.Tooling.Migrations, 0.1.0-alpha.20260722083539"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package IdentityFlow.Tooling.Migrations@0.1.0-alpha.20260722083539
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=IdentityFlow.Tooling.Migrations&version=0.1.0-alpha.20260722083539&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=IdentityFlow.Tooling.Migrations&version=0.1.0-alpha.20260722083539&prerelease
                    
Install as a Cake Tool

IdentityFlow Migration Tooling

This package is the PostgreSQL-first migration assembly for IdentityFlow EF stores.

The baseline includes first-party optional EF credential tables for API keys, certificate credentials, and personal access tokens. Custom or third-party model extensions need their own host-owned migrations.

Pre-1.0 migrations are single current baselines. Do not expect version-to-version upgrade support for unpublished schemas; regenerate the baseline when the owned model changes.

Generated EF migration, designer, and model snapshot files are expected to be large. Keep those files under provider-specific Migrations/ folders and do not split or hand-edit them for file-size cleanup alone.

Keep this package generic to IdentityFlow. Consuming-app schema notes, migration adapters, adoption plans, or app-specific DTOs belong in the consuming app repository.

Use IdentityFlowDbContext as a dedicated context in the host application and point it at the same database as the app if shared transactions are required. Keep the default auth schema unless the host has a strong reason to isolate it differently.

services.AddDbContext<IdentityFlowDbContext>(options =>
    options.UseNpgsql(
        connectionString,
        postgres =>
        {
            postgres.MigrationsAssembly(IdentityFlowMigrationAssembly.AssemblyName);
            postgres.MigrationsHistoryTable("__identityflow_migrations", "auth");
        }));

services.AddIdentityFlowEntityFrameworkStores();

For application DbContext composition, prefer deriving from IdentityFlowDbContext only when the host also uses IdentityFlowUser and IdentityFlowRole. Otherwise keep IdentityFlow in a dedicated context and coordinate transactions at the unit-of-work boundary.

Migration Commands

Set IDENTITYFLOW_MIGRATIONS_CONNECTION_STRING when you need a real database connection. Prefer this environment variable, or the file-based indirection below, because migration connection strings usually carry privileged DDL credentials.

For CLI flexibility without exposing the secret, pass an indirection after --:

  • --connection-string-env NAME reads the connection string from the named environment variable.
  • --connection-string-file /secure/path reads the connection string from a file.

The design-time factory still accepts the connection string as the first trailing argument after --, but this path is unsafe and emits a warning: a password-bearing argument can be recovered from shell history, CI traces, task logs, and local process listings. Do not use it for real credentials.

dotnet ef migrations add CurrentIdentityFlowPostgres \
  --project src/Tooling/IdentityFlow.Tooling.Migrations \
  --startup-project src/Tooling/IdentityFlow.Tooling.Migrations \
  --context IdentityFlowDbContext \
  --output-dir Postgres/Migrations

dotnet ef migrations list \
  --project src/Tooling/IdentityFlow.Tooling.Migrations \
  --startup-project src/Tooling/IdentityFlow.Tooling.Migrations \
  --context IdentityFlowDbContext \
  --no-connect

dotnet ef migrations script --idempotent \
  --project src/Tooling/IdentityFlow.Tooling.Migrations \
  --startup-project src/Tooling/IdentityFlow.Tooling.Migrations \
  --context IdentityFlowDbContext

Run the PostgreSQL apply smoke test with Docker/Testcontainers available:

./scripts/verify-migration-upgrade-harness.sh
./scripts/smoke-postgres-migrations.sh

SQL Server uses the same IdentityFlowDbContext and store abstractions through the separate IdentityFlow.Tooling.Migrations.SqlServer migration assembly:

./scripts/smoke-sqlserver-migrations.sh
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-alpha.20260722083539 56 7/22/2026
0.1.0-alpha.20260722073217 62 7/22/2026
0.1.0-alpha.20260620175120 65 6/20/2026
0.1.0-alpha.20260620172859 66 6/20/2026
0.1.0-alpha.20260620170646 61 6/20/2026
0.1.0-alpha.20260620143000 68 6/20/2026
0.1.0-alpha.20260620135000 60 6/20/2026
0.1.0-alpha.20260620122408 61 6/20/2026
0.1.0-alpha.20260614215234 66 6/14/2026