Repository navigation
9.35.1
The EF Core set: #627, #628 and #629.
⚠️ Read before upgrading if you use ComplexProperty with a Weasel-managed EF Core migration
Check those tables on your current version first — this is a bug that has already run.
A table-split ComplexProperty (one without ToJson()) was not mapped at all, on 9.35.0 and every earlier version carrying the EF bridge. Against a table EF Core itself created, a CreateOrUpdate migration emitted drop column total_amount. With PascalCase column names that failed with 42703 and aborted the migration, which is how this was found. With lowercase column names — what UseSnakeCaseNamingConvention() or an explicit HasColumnName produces — it succeeded, and the data is gone.
On a fresh database, the same gap created the table without those columns, and the first EF insert failed with 42703.
Every Weasel-managed EF migration path runs through this mapper, including Wolverine's UseEntityFrameworkCoreWolverineManagedMigrations() and its tenanted DbContext builders.
A behaviour change, in a patch release
A migration for an EF-derived table no longer drops columns, indexes or foreign keys that the EF model does not declare. That is the fix for #629 — the mapper has known translation gaps (TPC, entity splitting, temporal period columns, Npgsql enums), and reading an untranslated column as a removed one made every one of them a data-loss branch.
If you relied on a removed EF property taking its column with it, set EfSchemaMappingCustomization.AllowDrops = true. Tables you define in Weasel directly are unaffected.
Also in this release
- PostgreSQL: a drop-column statement now names the identifier the catalog holds, instead of folding it to lowercase and failing with
42703against a quoted PascalCase column (#627). - A
ToJson()container column is no longer typedjsonbon every provider — SQL Server getsnvarchar(max), MySQL and SQLiteTEXT, OracleCLOB(Migrator.DefaultJsonColumnType).
New public API
ITable.AddOnlyMigrations, EfSchemaMappingCustomization.AllowDrops, ISchemaObjectDeltaWithWithheldDrops, IMigrationLogger.WithheldDrop, AddOnlyMigration, Migrator.DefaultJsonColumnType. All described in the upgrade guide.