summaryrefslogtreecommitdiff
path: root/migrate/changeset/databases/postgres.py
diff options
context:
space:
mode:
authorIhar Hrachyshka <ihrachys@redhat.com>2014-09-15 13:58:07 +0200
committerMatt Riedemann <mriedem@us.ibm.com>2015-01-09 14:32:27 -0800
commit938757e7aa581646a6a501426a5dae84ebe5631f (patch)
treea1dcb36b8f1e973c62b6eae49439183517cb3b77 /migrate/changeset/databases/postgres.py
parent244c6c55d7aaa1f99e56027f4f5151fca51e7377 (diff)
downloadsqlalchemy-migrate-938757e7aa581646a6a501426a5dae84ebe5631f.tar.gz
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
Diffstat (limited to 'migrate/changeset/databases/postgres.py')
0 files changed, 0 insertions, 0 deletions