Corey Bryant 231a4d2ae9 Use legacy_alter_table ON in sqlite recreate_table
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
2019-01-15 22:01:26 +00:00
2015-08-29 06:33:47 -07:00
2019-01-15 18:24:57 +00:00
2015-10-17 22:38:53 +00:00
2013-07-11 16:54:46 -04:00
2010-07-08 19:16:22 +02:00
2013-07-12 10:53:37 -04:00
2013-07-11 16:54:46 -04:00
2015-08-29 06:33:47 -07:00
2017-03-01 16:29:33 +11:00
2019-01-15 20:14:08 +00:00
2017-04-07 15:59:23 +02:00
2014-04-09 17:32:52 +02:00
2014-02-26 15:04:54 -05:00
2014-04-09 17:32:52 +02:00
2014-04-09 17:32:52 +02:00
2013-07-11 16:54:46 -04:00
2019-01-15 18:25:36 +00:00

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

Description
Database schema migration for SQLAlchemy
Readme 2.3 MiB
Languages
Python 99.3%
Shell 0.7%