deb-migrate/migrate
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
..
changeset Don't add warnings filter on import 2015-01-08 16:22:59 -06:00
tests Ignore transaction management statements in SQL scripts 2015-01-09 14:32:27 -08:00
versioning Ignore transaction management statements in SQL scripts 2015-01-09 14:32:27 -08:00
__init__.py Un-break the version in migrate/__init__.py 2013-11-15 13:04:56 -05:00
exceptions.py move all exception classes to migrate.exceptions 2010-09-07 02:25:29 +02:00