-
Notifications
You must be signed in to change notification settings - Fork 0
Database Migrations
SharpAccess uses an immutable ordered migration catalog shared through provider-neutral APIs and implemented by each active DB provider.
The repository supports explicit migration, validation, status, and script-generation workflows. Production hosts should not rely on uncontrolled schema mutation during startup.
A host may initialize through:
await app.Services.InitializeSharpAccessAsync(
app.Lifetime.ApplicationStopping);Use the repository documentation to select the appropriate migration mode for local development, deployment, or validation.
The migration tool exposes:
-
migrate; -
validate; -
status; -
script.
Run it through the PowerShell wrapper in scripts/ so repository-root resolution and exit handling remain consistent with the Windows-only toolchain.
- Migration identities are ordered and immutable.
- Provider implementations must produce equivalent schema meaning.
- Historical upgrade paths are validated.
- Authorization, tenant ownership, token-hash versioning, refresh authentication time, reconciliation, and pagination indexes are part of the catalog.
- SQL Server and MySQL have no active migration implementation.
Production deployment can separate a migration principal from a runtime principal. The migration principal owns controlled DDL; the runtime principal receives only the DML/read permissions and ledger access required by the host.
SharpAccess · Windows · .NET 10 · PowerShell 7 · Repository · Security · License