Comment 5 for bug 1241038

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to sqlalchemy-migrate (master)

Reviewed: https://review.openstack.org/52634
Committed: http://github.com/stackforge/sqlalchemy-migrate/commit/2485118c24b2293747dfafb3be58a6bdc65f7d66
Submitter: Jenkins
Branch: master

commit 2485118c24b2293747dfafb3be58a6bdc65f7d66
Author: Roman Podolyaka <email address hidden>
Date: Fri Oct 18 14:23:11 2013 +0300

    Fix dropping of indexed columns in sqlite/sa08

    Version 0.8 of SQLAlchemy added support of indexes
    on expressions in addition to plain table columns,
    which changed the way indexes are created.

    This broke support of dropping columns of composite
    indexes for SQLite: due to limitations of ALTER in
    SQLite every time a column is dropped, we recreate
    the whole table without the given column; if a
    column is a part of a composite index, we change the
    index definition to omit that column and then indexes
    are recreated too.

    SQLAlchemy versions starting from 0.8 no more pay
    attention to 'columns' attribute of Index instances
    when generating DDL for indexes, so when one of columns
    of a composite index is dropped, we try to create a
    new index on the column that doesn't exist anymore,
    which of course fails.

    Closes-Bug: #1241038

    Change-Id: I777b8ce36e36f49bfb0889908811a063cf1a527b