From: Robbie Coomber Date: Mon, 17 Feb 2014 15:17:05 +0000 (+0000) Subject: Return the script object from command.revision X-Git-Tag: rel_0_6_4~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ecb0ede7e3c25b6492d66f638c01340bdad42cb9;p=thirdparty%2Fsqlalchemy%2Falembic.git Return the script object from command.revision --- diff --git a/alembic/command.py b/alembic/command.py index a44788da..f1c59621 100644 --- a/alembic/command.py +++ b/alembic/command.py @@ -95,7 +95,8 @@ def revision(config, message=None, autogenerate=False, sql=False): template_args=template_args, ): script.run_env() - script.generate_revision(util.rev_id(), message, **template_args) + return script.generate_revision(util.rev_id(), message, refresh=True, + **template_args) def upgrade(config, revision, sql=False, tag=None):