Sourced from alembic's releases.
1.18.4
Released: February 10, 2026
bug
[bug] [operations] Reverted the behavior of
Operations.add_column()that would automatically render the "PRIMARY KEY" keyword inline when aColumnwithprimary_key=Trueis added. The automatic behavior, added in version 1.18.2, is now opt-in via the newOperations.add_column.inline_primary_keyparameter. This change restores the ability to render a PostgreSQL SERIAL column, which is required to beprimary_key=True, while not impacting the ability to render a separate primary key constraint. This also provides consistency with theOperations.add_column.inline_referencesparameter and gives users explicit control over SQL generation.To render PRIMARY KEY inline, use the
Operations.add_column.inline_primary_keyparameter set toTrue:op.add_column( "my_table", Column("id", Integer, primary_key=True), inline_primary_key=True )References: #1232
1.18.3
Released: January 29, 2026
bug
[bug] [autogenerate] Fixed regression in version 1.18.0 due to #1771 where autogenerate would raise
NoReferencedTableErrorwhen a foreign key constraint referenced a table that was not part of the initial table load, including tables filtered out by theEnvironmentContext.configure.include_namecallable or tables in remote schemas that were not included in the initial reflection run.The change in #1771 was a performance optimization that eliminated additional reflection queries for tables that were only referenced by foreign keys but not explicitly included in the main reflection run. However, this optimization inadvertently removed the creation of
Tableobjects for these referenced tables, causing autogenerate to fail when processing foreign key constraints that pointed to them.The fix creates placeholder
Tableobjects for foreign key targets
... (truncated)