diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-02-03 11:40:40 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-02-03 11:51:13 -0500 |
commit | 0955d44f4b93ff520d07253373bb6cb9b25220b5 (patch) | |
tree | a7ebbca6ade9d19963e2c18ac00d7e9676454101 /alembic/command.py | |
parent | 267063c1b804b34174ab1fc388ccc616655631fd (diff) | |
download | alembic-0955d44f4b93ff520d07253373bb6cb9b25220b5.tar.gz |
- move resolution of "starting rev" for --sql mode into
get_current_heads() directly; therefore we don't need to
do this in alembic.command, which we were doing for stamp but
not downgrade/upgrade. The slight change here is that the
context.get_starting_revision_argument() method will
return an abbreviated starting rev as abbreviated in
all cases, including the stamp command, where we previously
were converting a stamp argument first, but not for the
upgrade or downgrade commands.
- Fixed bug where using a partial revision identifier as the
"starting revision" in ``--sql`` mode in a downgrade operation
would fail to resolve properly. fixes #269
Diffstat (limited to 'alembic/command.py')
-rw-r--r-- | alembic/command.py | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/alembic/command.py b/alembic/command.py index 530af17..5ba6d6a 100644 --- a/alembic/command.py +++ b/alembic/command.py @@ -330,9 +330,6 @@ def stamp(config, revision, sql=False, tag=None): if not sql: raise util.CommandError("Range revision not allowed") starting_rev, revision = revision.split(':', 2) - starting_rev = script.get_revision(starting_rev) - if starting_rev is not None: - starting_rev = starting_rev.revision def do_stamp(rev, context): return script._stamp_revs(revision, rev) @@ -347,5 +344,3 @@ def stamp(config, revision, sql=False, tag=None): tag=tag ): script.run_env() - - |