Skip to content

9.26.0

Choose a tag to compare

@jeremydmiller jeremydmiller released this 22 Aug 13:58
· 131 commits to master since this release
efb8a60

Ten changes since 9.25.2. A minor rather than a patch — see Upgrade notes below.

Full notes: Upgrading to 9.26

Upgrade notes

Two behaviours change in ways you can observe, and one adds public API. Emitted DDL is otherwise unchanged.

  • DbObjectName.Schema and .Name now hold the undelimited name (#500). If you compare either against a literal carrying quotes or brackets, that comparison changes meaning. Marten and Wolverine were checked and carry none. Bare names are byte-identical.
  • Whitespace inside a SQL Server function body is now significant (#496). Reformatting a declared body costs one drop-and-recreate, after which it stays clean.
  • IDatabaseProvider gains a Rules property (#509) — virtual, null by default, so a provider implemented outside Weasel keeps compiling.

Fixed silently — no error was ever raised

These four are worth reading even if nothing looks broken from where you are sitting.

  • A delimited schema name meant the object was created once and never migrated again (#499). The delta read Create forever, CREATE TABLE IF NOT EXISTS did nothing, and every later change was discarded while ApplyAllAsync returned normally. On SQL Server it surfaced loudly instead, as There is already an object named 'x' in the database.
  • No index was read in any schema named pg… (#504). pgcontrol, pgqueues, pgdata — the primary key still arrived, so the table looked correct and only its non-PK indexes were missing. The resulting bare create index then failed with 42P07 on the second startup and aborted the rest of the migration.
  • An invalid index reported no drift (#503). An invalid index is ignored by the planner, so queries silently did a sequential scan while db-assert agreed the schema was correct. PostgreSQL leaves one behind whenever CREATE INDEX CONCURRENTLY fails partway.
  • A SQL Server column with a default could never be dropped (#505). The patch was generated, it just always failed.

Migrations that failed outright

  • More than about a thousand tables on SQL Server (#496, #497). Introspection bound two parameters per table into one command against a 2100-parameter ceiling, so the migration failed before any comparison happened. Queries are now batched under the dialect's limit.
  • A least-privilege role could not migrate into its own schema (#495, #498). PostgreSQL checks CREATE on the database before evaluating CREATE SCHEMA's own IF NOT EXISTS, so a role granted USAGE, CREATE on one schema was refused with 42501 on a schema that already existed — aborting the whole script.
  • A qualified name containing a dot could not be parsed (#501). "my.schema".things, [my.table], or the PK_dbo.__MigrationHistory that EF6 gives its own history table.

New

  • A non-blocking index on a partitioned table (#494). PostgreSQL refuses CREATE INDEX CONCURRENTLY on a partitioned parent, so adding an index meant an ACCESS EXCLUSIVE lock for the whole build — a write outage rather than a migration. Weasel now emits the supported ON ONLY → per-partition concurrent build → ATTACH PARTITION sequence. Nothing changes unless an index is both concurrent and on a partitioned table.

#504, #505 and the Wolverine half of #495 came in from JasperFx/wolverine#3997.