]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commit
Render a single "pass" only for UpgradeOps, DowngradeOps
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 17 Sep 2019 21:55:44 +0000 (17:55 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 17 Sep 2019 22:04:33 +0000 (18:04 -0400)
commit10795bfff96bcc0efca2212b92846b36fd25b786
treec4543b89fd13c28e7a8ef84fc94982e937551299
parentbb153bd4f881f6847fbe80df104fb63b1224d68d
Render a single "pass" only for UpgradeOps, DowngradeOps

Improved the Python rendering of a series of migration operations such that
a single "pass" is rendered for a :class:`.UpgradeOps` or
:class:`.DowngradeOps` based on if no lines of Python code actually
rendered under the operation, rather than whether or not sub-directives
exist. Removed extra "pass" lines that would generate from the
:class:`.ModifyTableOps` directive so that these aren't duplicated under
operation rewriting scenarios.

Change-Id: Ia2547811565ac24ee0f56ce470f96ec567912de3
Fixes: #550
alembic/autogenerate/render.py
docs/build/unreleased/550.rst [new file with mode: 0644]
tests/test_script_production.py