]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commit
implement full copy for indexes in batch
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 10 May 2022 12:39:57 +0000 (08:39 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 10 May 2022 13:59:38 +0000 (09:59 -0400)
commit188dd8b2f098e804c8e64956e9c6490d41f1d7ce
tree1ec45bdb3dfcea29487bc6f9f574d543b1383006
parent4790411e319df0a367c4f2adbf18bf3cd1862a0b
implement full copy for indexes in batch

Fixed issue in batch mode where CREATE INDEX would not use a new column
name in the case of a column rename.

Indexes were previously being moved to the new table without any
steps to rewrite columns.   We now vendor the copy approach
from table.to_metadata so that there's a new index expressed
in terms of the new columns.

Change-Id: Ied84232037aee0b2bf2094b3d3474013d7b41b34
Fixes: #1034
alembic/operations/batch.py
alembic/util/compat.py
alembic/util/sqla_compat.py
docs/build/unreleased/1034.rst [new file with mode: 0644]
tests/test_batch.py