You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apply enum pre-DDL and placeholder substitution in Table.alter
Table.alter skipped both steps declare performs on adapter output: it
never substituted the PostgreSQL schema placeholder, and never issued
the adapter's pending CREATE TYPE. Adding an enum attribute therefore
emitted a literal "{database}"."enum_<hash>" against a type that was
never created.
declare.alter now accepts an optional schema_name and returns the
pre-DDL alongside the ALTER clauses. The pending types are drained
between the two prepare_declare calls, since both register types as a
side effect and the old definition's types already exist; what the old
parse registers is discarded so it cannot leak into the next declare
on the same adapter.
Adding a non-primary attribute also emitted MySQL's AFTER positioning
clause, which PostgreSQL has no equivalent for. Gate it behind a new
supports_column_position adapter property, dropping the position
before it can force a statement so a reorder-only change stays a
no-op rather than becoming a positionless MODIFY.
0 commit comments