summaryrefslogtreecommitdiff
path: root/alembic/command.py
diff options
context:
space:
mode:
authorRobbie Coomber <robbie.coomber@gmail.com>2014-02-17 15:17:05 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2014-02-17 15:55:09 -0500
commitecb0ede7e3c25b6492d66f638c01340bdad42cb9 (patch)
tree0cd869f7083fc98de5682cd71ff8bf82f620ed82 /alembic/command.py
parent161a48a3dfb75299e7ae5470e83c604364b97cfe (diff)
downloadalembic-ecb0ede7e3c25b6492d66f638c01340bdad42cb9.tar.gz
Return the script object from command.revision
Diffstat (limited to 'alembic/command.py')
-rw-r--r--alembic/command.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/alembic/command.py b/alembic/command.py
index a44788d..f1c5962 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):