github sqlalchemy/alembic rel_1_18_2
1.18.2

16 hours ago

1.18.2

Released: January 28, 2026

usecase

  • [usecase] [operations] The primary_key parameter on Column is 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_references parameter to Operations.add_column()
    which allows rendering of REFERENCES clauses inline within the ADD COLUMN directive rather than as a separate ADD CONSTRAINT directive.
    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_default and
    AlterColumnOp.existing_server_default parameters failed to
    accommodate common SQLAlchemy SQL constructs such as null() and
    text(). Pull request courtesy Sebastian Kreft.

    References: #1669

Don't miss a new alembic release

NewReleases is sending notifications on new releases.