Comment 1 for bug 1241038

Revision history for this message
Roman Podoliaka (rpodolyaka) wrote :

This is has nothing to do with Nova, but rather with sqlalchemy-migrate not supporting SQLAlchemy >= 0.8 versions properly.

Due to limitation of ALTER statement in SQLite sqlachemy-migrate recreates a table when its column is dropped. If there is an index on this column - it's not recreated for a new table. For composite indexes it's a bit interesting: sqlalchemy-migrate authors tried to recreate composite indexes not including the column that was dropped. This worked fine till SQLAlchemy 0.8 was released, which brought support of expression indexes. sqlalchemy-migrate doesn't know nothing about expression columns, so it just ignores them. At the same time, SQLAlchemy versions >= 0.8 use expressions attribute of Index instance to emit DDL. This means, that sqlalchemy-migrate forces SQLAlchemy to create an index on column, that doesn't exist.

I'll check, if I can fix this easily in sqlalchemy-migrate, so we could release later. Anyway, I wouldn't recommend anyone to use migrations with SQLite.