Repository navigation
9.33.0
An exception sweep. Eight issues (#595β#602) about what Weasel says when something goes wrong, plus JasperFx 2.74.0. No migration behaves differently, and no DDL changes.
π Full upgrade guide
Three failures change their exception type
Source-compatible, and all three keep the original exception as InnerException β but a catch written against the old type stops matching.
| Failure | Was | Now |
|---|---|---|
| A role lacking privilege during a migration | the raw PostgresException / SqlException / MySqlException / OracleException |
InsufficientDatabasePrivilegeException |
sp_getapplock refusing the SQL Server migration lock |
a bare System.Exception |
GlobalLockUnavailableException |
AssertDatabaseMatchesConfigurationAsync on drift that cannot be applied incrementally |
SchemaMigrationException |
DatabaseValidationException |
If you match on a SQLSTATE β catch (PostgresException e) when (e.SqlState == "42501") is the common one β read the upgrade guide first.
Highlights
- Permission failures are named (#598). The most common real-world migration failure used to surface as a SQLSTATE in an inner exception.
InsufficientDatabasePrivilegeExceptionnames the role, the database, the refused statement, and the two remedies. Covers PostgreSQL, SQL Server, MySQL and Oracle. Introspection being privilege-filtered β which makes a restricted role look at an empty database β is now called out bydb-assert, and the docs gain a Permissions section. - The migrator warns before it drops a table (#600).
AutoCreate.All's drop-and-recreate is the only branch in the migrator that destroys data, and nothing announced it. It now warns once per object before any statement runs, naming why the change could not be applied in place. NewMigrator.RefuseDestructiveChanges(default off) refuses the branch outright. sp_getapplockreturn codes are decoded (#599), the lock timeout is configurable at last, and SQL Server gains anIGlobalLockimplementation soResourceMigrationFailureMode.ContinueOnFailuresmeans the same thing on both providers.- Assert reports drift as drift (#601) even when it cannot be applied incrementally.
- A numeric-revision
ConcurrencyExceptionalways carries theUpdateRevisionhint (#595) β one throw site, so this fixes Marten, Polecat and Fisher at once. - The rich per-event append gains an exception-transform hook (#596), so a dialect can translate a version conflict with the
StreamActionin hand instead of parsing redacted provider error detail. - Six user-facing message defects (#602), and the
AutoCreatedocumentation corrected (#597) βNonedoes not throw, andCreateOrUpdatedoes drop columns the model no longer declares.