
Use "PRAGMA legacy_alter_table = ON" with sqlite >= 3.26 when using "ALTER TABLE RENAME TO migration_tmp" to maintain legacy behavior. As of sqlite version 3.26, when a table is renamed using "ALTER TABLE RENAME TO", REFERENCES clauses that refer to the table will be updated. To maintain legacy (3.24 and earlier) behavior, "PRAGMA legacy_alter_table" can be set to true and "PRAGMA foreign_keys" can be set to false. [1] [1] https://www.sqlite.org/src/info/ae9638e9c0ad0c36 Thanks to "László Böszörményi (GCS)" <gcs@debian.org> for providing the code for this patch, which has since been slightly modified. Change-Id: I539988ab2ad6df6c8f423ecec15364ad8fcc7267 Closes-Bug: 1807262
sqlalchemy-migrate
Fork from http://code.google.com/p/sqlalchemy-migrate/ to get it working with SQLAlchemy 0.8.
Inspired by Ruby on Rails' migrations, Migrate provides a way to deal with database schema changes in SQLAlchemy projects.
Migrate extends SQLAlchemy to have database changeset handling. It provides a database change repository mechanism which can be used from the command line as well as from inside python code.
Help
Sphinx documentation is available at the project page readthedocs.org.
Users and developers can be found at #openstack-dev on Freenode IRC network and at the public users mailing list migrate-users.
New releases and major changes are announced at the public announce mailing list openstack-dev and at the Python package index sqlalchemy-migrate.
Homepage is located at stackforge
You can also clone a current development version
Tests and Bugs
To run automated tests:
- install tox:
pip install -U tox
- run tox:
tox
- to test only a specific Python version:
tox -e py27
(Python 2.7)
Please report any issues with sqlalchemy-migrate to the issue tracker at Launchpad issues