]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
support insert of table columns in specific positions
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 19 Jun 2025 16:39:17 +0000 (12:39 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 2 Jul 2025 21:22:40 +0000 (17:22 -0400)
commit637ecd40eb02b66973728a1516bc83a82f9c34ae
treeb841c670d5226a41f18cf75c9c3e8ee6740034d4
parentb668fad821c08fd9b8420072ec8241e9cb5074a1
support insert of table columns in specific positions

Added method :meth:`.TableClause.insert_column` to complement
:meth:`.TableClause.append_column`, which inserts the given column at a
specific index.   This can be helpful for prepending primary key columns to
tables, etc.

Fixes: #7910
Change-Id: Ife1eb8ad90aa61d38c457a86312cfe5d0d471106
doc/build/changelog/unreleased_21/7910.rst [new file with mode: 0644]
lib/sqlalchemy/sql/base.py
lib/sqlalchemy/sql/schema.py
lib/sqlalchemy/sql/selectable.py
test/sql/test_metadata.py