MintPlayer.Spark.Migrations
11.0.0
dotnet add package MintPlayer.Spark.Migrations --version 11.0.0
NuGet\Install-Package MintPlayer.Spark.Migrations -Version 11.0.0
<PackageReference Include="MintPlayer.Spark.Migrations" Version="11.0.0" />
<PackageVersion Include="MintPlayer.Spark.Migrations" Version="11.0.0" />
<PackageReference Include="MintPlayer.Spark.Migrations" />
paket add MintPlayer.Spark.Migrations --version 11.0.0
#r "nuget: MintPlayer.Spark.Migrations, 11.0.0"
#:package MintPlayer.Spark.Migrations@11.0.0
#addin nuget:?package=MintPlayer.Spark.Migrations&version=11.0.0
#tool nuget:?package=MintPlayer.Spark.Migrations&version=11.0.0
MintPlayer.Spark.Migrations
One-time database migrations for MintPlayer.Spark.
Define a migration by implementing ISparkMigration on a non-abstract class and giving it a
static abstract long Version. Migrations run once, in version order, at startup — after
indexes are created and before the app serves requests.
using MintPlayer.Spark.Migrations;
using Raven.Client.Documents.Session;
public partial class M_202606081200_SeedDemo : ISparkMigration
{
public static long Version => 202606081200; // sortable timestamp; must be unique
public static string? Description => "Seed demo data";
[Inject] private readonly IAsyncDocumentSession session; // full scoped DI, like a cron job
public async Task UpAsync(CancellationToken cancellationToken)
{
await session.StoreAsync(new Company { Name = "Acme" }, cancellationToken);
await session.SaveChangesAsync(cancellationToken);
}
}
Enable it — the source generator discovers every ISparkMigration and emits AddMigrations():
builder.Services.AddSpark(builder.Configuration, spark =>
{
spark.UseContext<MyContext>();
spark.AddMigrations(); // generated; auto-discovers all migrations in this project
});
Or register manually:
spark.AddMigrations(m => m.AddMigration<M_202606081200_SeedDemo>());
Guarantees
- Run-once per database — each applied version writes a
SparkMigrationRecords/{version}marker document; a migration whose marker exists is skipped. - Ordered — migrations run ascending by
Version. - Multi-node safe — a cluster-wide RavenDB compare-exchange lock (
spark/migrations/lock, 30-minute lease) ensures only one node applies migrations at a time. - Fail-fast — a migration that throws aborts startup and is left unmarked, so it retries on the
next start. Call
SaveChangesAsyncyourself; the version marker is written only afterUpAsyncreturns successfully.
Forward-only (no Down) by design — migrations describe how the data moves forward.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- MintPlayer.SourceGenerators.Attributes (>= 13.1.2)
- MintPlayer.Spark.Abstractions (>= 11.0.0)
- RavenDB.Client (>= 7.2.7)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on MintPlayer.Spark.Migrations:
| Package | Downloads |
|---|---|
|
MintPlayer.Spark.Authorization
Optional authorization package for MintPlayer.Spark low-code framework. Provides group-based access control for PersistentObjects and Queries. |
|
|
MintPlayer.Spark.AllFeatures
All-in-one package for MintPlayer.Spark. References all Spark libraries and source-generates AddSparkFull/UseSparkFull/MapSparkFull convenience methods. |
|
|
MintPlayer.Spark.IdentityProvider
Self-contained OIDC Identity Provider for MintPlayer.Spark. Adds Authorization Code + PKCE flow with RavenDB storage. No external OIDC framework required. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.0 | 221 | 11/16/2026 |
| 11.0.0-preview.106 | 92 | 11/12/2026 |
| 11.0.0-preview.105 | 90 | 11/11/2026 |
| 11.0.0-preview.104 | 130 | 11/7/2026 |
| 11.0.0-preview.103 | 96 | 11/6/2026 |
| 11.0.0-preview.102 | 94 | 11/5/2026 |
| 11.0.0-preview.101 | 124 | 11/5/2026 |
| 11.0.0-preview.100 | 97 | 11/4/2026 |
| 11.0.0-preview.99 | 104 | 10/30/2026 |
| 11.0.0-preview.98 | 97 | 10/24/2026 |
| 11.0.0-preview.97 | 95 | 10/24/2026 |
| 11.0.0-preview.96 | 132 | 10/11/2026 |
| 11.0.0-preview.95 | 199 | 10/4/2026 |
| 11.0.0-preview.94 | 87 | 10/4/2026 |
| 11.0.0-preview.93 | 88 | 10/2/2026 |
| 11.0.0-preview.92 | 81 | 10/2/2026 |
| 11.0.0-preview.91 | 79 | 9/29/2026 |
| 11.0.0-preview.90 | 69 | 9/27/2026 |
| 11.0.0-preview.89 | 71 | 9/27/2026 |
| 11.0.0-preview.88 | 76 | 9/26/2026 |