Infra.Fusion.Migration (0.1.0-experimental.3)
Installation
dotnet nuget add source --name ochekroun --username your_username --password your_token dotnet add package --source ochekroun --version 0.1.0-experimental.3 Infra.Fusion.MigrationAbout this package
Experimental migration and script runner for Fusion with SQLite, PostgreSQL, and SQL Server support.
Fusion Migration
Experimental package: APIs may change between releases. This package is intended for early testing and feedback.
Fusion Migration provides numbered SQL and C#/F# migration jobs for Fusion applications. The assembly and namespaces currently retain their implementation names under Infra.Fusion.Stuff; the script engines are in Infra.Fusion.Stuff.ScriptEngine.
The package includes script engines for:
- SQLite through
SqliteScriptEngine; - PostgreSQL through
PostgresqlScriptEngine; - SQL Server through
SqlSmoScriptEngine.
SqlSmoScriptEngine uses Microsoft.SqlServer.SqlManagementObjects, which is therefore a dependency of this experimental package.
using Infra.Fusion.Stuff.ScriptEngine;
await using var engine = new SqliteScriptEngine(connection);
await engine.ApplyAsync("_Migrations", scriptsDirectory);
Migration files use a numeric prefix and a supported extension such as 001.create-schema.sql, 002.seed.cs, or 003.adjust-data.fs. Applied migrations are recorded in the table supplied to ApplyAsync.
Updated for Infra.Fusion 0.1.0-experimental.3, including the latest persistence APIs. Experimental release without compatibility guarantees.