RETIRED, further work has moved to Debian project infrastructure
Go to file
Ihar Hrachyshka 938757e7aa Ignore transaction management statements in SQL scripts
Now that we don't run SQL script with a single .execute() call,
transaction management statements (BEGIN, COMMIT, END) fail with
operational error. Ignore them if occurred in a script.

All in all, transactions are managed by SQLAlchemy-migrate itself, so
there is no reason for the calling code to pass those statements in a
SQL script. Warn user about the statements that are ignored.

The ideal response to such a warning from library users is removing
those redundant transaction management statements from their scripts.

Note: ROLLBACK is not ignored even though it's one of transaction
management statements because its usage in migration scripts is insane
anyway, and we're better fail on it and not (almost) silently ignore it.

Change-Id: Ie4179c0e9341d42656d66821aaac23f8dcd33927
Closes-bug: 1368391
2015-01-09 14:32:27 -08:00
doc/source Merge "Fix 3 files with Windows line endings to Unix line endings." 2014-07-22 21:48:39 +00:00
migrate Ignore transaction management statements in SQL scripts 2015-01-09 14:32:27 -08:00
.gitignore Updated to OpenStack Build stuff. 2013-07-11 16:54:46 -04:00
.gitreview Initial changes to import into StackForge. 2013-07-11 15:50:07 -04:00
.testr.conf Updated to OpenStack Build stuff. 2013-07-11 16:54:46 -04:00
COPYING add MIT licence file 2010-07-08 19:16:22 +02:00
MANIFEST.in Updated to OpenStack Build stuff. 2013-07-11 16:54:46 -04:00
README.rst Fix broken development version link in README 2013-11-15 13:41:47 -05:00
TODO Updated to OpenStack Build stuff. 2013-07-11 16:54:46 -04:00
doc-requirements.txt Add a reqs files for RTFD 2013-07-12 10:53:37 -04:00
requirements.txt SqlScript: execute multiple statements one by one 2014-08-23 21:34:13 +02:00
setup.cfg Remove the tag_build line from setup.cfg 2013-11-14 14:55:10 -05:00
setup.py Stop using the d2to1-based pbr 2013-10-07 12:02:24 -04:00
test-requirements-py2.txt Port to Python3 2014-04-09 17:32:52 +02:00
test-requirements-py3.txt Port to Python3 2014-04-09 17:32:52 +02:00
test-requirements.txt Pin testtools to < 0.9.36 2014-08-23 21:34:07 +02:00
test_db.cfg Eradicate trailing whitespace 2014-02-26 15:04:54 -05:00
test_db_py3.cfg Port to Python3 2014-04-09 17:32:52 +02:00
tox.ini Port to Python3 2014-04-09 17:32:52 +02:00

README.rst

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 packages.python.org.

Users and developers can be found at #sqlalchemy-migrate 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 migrate-announce 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:

  • Copy test_db.cfg.tmpl to test_db.cfg
  • Edit test_db.cfg with database connection strings suitable for running tests. (Use empty databases.)
  • $ pip install -r requirements.txt -r test-requirements.txt
  • $ python setup.py develop
  • $ testr run --parallel

Please report any issues with sqlalchemy-migrate to the issue tracker at code.google.com issues