NetArcaWs.EntityFrameworkCore.Migrations.Sqlite
0.7.0
dotnet add package NetArcaWs.EntityFrameworkCore.Migrations.Sqlite --version 0.7.0
NuGet\Install-Package NetArcaWs.EntityFrameworkCore.Migrations.Sqlite -Version 0.7.0
<PackageReference Include="NetArcaWs.EntityFrameworkCore.Migrations.Sqlite" Version="0.7.0" />
<PackageVersion Include="NetArcaWs.EntityFrameworkCore.Migrations.Sqlite" Version="0.7.0" />
<PackageReference Include="NetArcaWs.EntityFrameworkCore.Migrations.Sqlite" />
paket add NetArcaWs.EntityFrameworkCore.Migrations.Sqlite --version 0.7.0
#r "nuget: NetArcaWs.EntityFrameworkCore.Migrations.Sqlite, 0.7.0"
#:package NetArcaWs.EntityFrameworkCore.Migrations.Sqlite@0.7.0
#addin nuget:?package=NetArcaWs.EntityFrameworkCore.Migrations.Sqlite&version=0.7.0
#tool nuget:?package=NetArcaWs.EntityFrameworkCore.Migrations.Sqlite&version=0.7.0
NetArcaWs migrations for Sqlite
This optional LGPL-3.0-or-later package contains the official, versioned EF Core migrations for NetArcaWs persistence modules. It is separate from operational stores. Register it and run it only from an explicit deployment actor; normal API registration and startup do not connect or change the schema.
Select only the modules required by this deployment using the same NetArcaWsModelOptions used by the stores. A service selection changes which operations use a module, not its schema. For example:
NetArcaWsModelOptions modelOptions = NetArcaWsModelOptions.Configure(options =>
options.AddInvoicing(ArcaService.Wsfev1)
.AddInvoiceRecovery(ArcaService.Wsfev1)
.AddWsaaTickets(ArcaService.PadronA5));
var deploymentServices = new ServiceCollection();
deploymentServices.AddNetArcaWsSqliteMigrations(connectionString, modelOptions);
Resolve INetArcaWsMigrator from the deployment host's provider:
INetArcaWsMigrator migrator = deploymentProvider.GetRequiredService<INetArcaWsMigrator>();
NetArcaWsMigrationStatus before = await migrator.GetStatusAsync(cancellationToken);
string sql = migrator.GenerateScript(NetArcaWsPersistenceModule.Invoicing);
NetArcaWsMigrationStatus after = await migrator.ApplyAsync(cancellationToken);
GetStatusAsync returns per-module Empty, UpgradeAvailable, Current, UntrackedSchema, UnknownAppliedMigration, InconsistentHistory, or TrackedSchemaIncomplete, along with known, applied, pending IDs and present owned tables. ApplyAsync preflights selected modules and applies pending migrations in deterministic order. GenerateScript(module, fromMigration: "0", toMigration: null, idempotent: false) accepts only an installed/selected module and known ascending migration endpoints; null means latest. The idempotent option is provider-dependent and SQLite throws NotSupportedException when it is requested. Script generation opens no database connection.
Review status and generated SQL before applying as appropriate. GenerateScript opens no connection; status and apply do. Give the deployment actor schema-change permissions and the application runtime only its required data permissions. Serialize deployment jobs for a database: preflight runs outside EF's migration lock and external deployments are not coordinated. Apply modules in either order. Disabling a module preserves its tables, history, and data.
The module-owned tables are NetArcaInvoices, NetArcaInvoiceRevisions, and NetArcaInvoiceSeriesReservations for invoicing, NetArcaInvoiceRecoveryJobs for durable recovery, and NetArcaWsaaTickets for shared WSAA tickets. The recovery module has its own history __NetArcaWsInvoiceRecoveryMigrations and initial migration ID 20261007000400_InitialInvoiceRecovery; its context creates only the queue table. Recovery requires selecting the same service with both AddInvoicing(...) and AddInvoiceRecovery(...). The migration API only moves forward. Existing tables without official history, unknown applied IDs, gaps, or incomplete tracked schemas are rejected; no baseline is inserted.
Updating means installing the new package and applying its pending official migrations. Consumers do not run migrations add for these dedicated tables. Future NetArcaWs model changes require a new published migration for each provider and module, preserving previous migrations and testing upgrades from the previous version. The initial migration scripts are versioned from 0 to latest; they are not idempotent adoption scripts. Existing DDL, EnsureCreated schemas, consumer-owned histories, and the core SQLite journal are not adopted or transferred automatically. Before any future adoption, manually compare ownership and schema and design a reviewed procedure; do not insert history rows automatically or drop data.
No hay scripts idempotentes de SQLite; usá un rango explícito. El motor puede crear __EFMigrationsLock durante la migración. SQLite está pensado para un archivo local y varios procesos del mismo host, no NFS ni varios hosts. Multi-host requiere storage transaccional compartido con un provider de servidor soportado.
This migrations package adds no ARCA calls, certificate storage, or worker. The companion EF runtime package provides an opt-in recovery worker. No exactly-once guarantee is made. Check current NuGet version and package availability: .
| Product | Versions 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. |
-
net10.0
- Microsoft.EntityFrameworkCore.Sqlite (>= 10.0.12)
- NetArcaWs.EntityFrameworkCore (>= 0.7.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.