1.18.2
Released: January 28, 2026
usecase
-
[usecase] [operations] The
primary_keyparameter onColumnis now honored when
Operations.add_column()is used, and will emit the "PRIMARY KEY"
keyword inline within the ADD COLUMN directive. This is strictly a syntax
enhancement; no attempt is made to reconcile the column's primary key
status with any existing primary key constraint or particular backend
limitations on adding columns to the primary key.References: #1232
-
[usecase] [operations] Added
inline_referencesparameter toOperations.add_column()
which allows rendering ofREFERENCESclauses inline within theADD COLUMNdirective rather than as a separateADD CONSTRAINTdirective.
This syntax is supported by PostgreSQL, Oracle, MySQL 5.7+, and MariaDB
10.5+, and can provide performance benefits on large tables by avoiding
full table validation when adding a nullable foreign key column.References: #1780
bug
-
[bug] [typing] Fixed typing issue where the
AlterColumnOp.server_defaultand
AlterColumnOp.existing_server_defaultparameters failed to
accommodate common SQLAlchemy SQL constructs such asnull()and
text(). Pull request courtesy Sebastian Kreft.References: #1669