]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commit
add inline_reference parameter
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 27 Jan 2026 19:35:59 +0000 (14:35 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 27 Jan 2026 21:04:19 +0000 (16:04 -0500)
commit8bf6926bb386018ff41a7c92a5eb55ef56bed175
tree1cc67f7966a36996c17b8a265e0c6ba6d59b90a1
parent8c0e2528af2fcec3dfaa731dbfb4805b62698d3c
add inline_reference parameter

Added ``inline_references`` parameter to :meth:`.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.

Fixes: #1780
Change-Id: I6749c0a2b92af61e95decea552c8afdd93e11c19
alembic/ddl/base.py
alembic/ddl/impl.py
alembic/op.pyi
alembic/operations/base.py
alembic/operations/ops.py
alembic/operations/toimpl.py
docs/build/unreleased/1780.rst [new file with mode: 0644]
tests/test_batch.py
tests/test_op.py