From b9913c6458adba1e511ee86fd5a7291214f2eb9f Mon Sep 17 00:00:00 2001 From: Bogdan Gaza Date: Sat, 18 Jan 2014 22:12:08 +0200 Subject: [PATCH] Added the branches command --- flask_migrate/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/flask_migrate/__init__.py b/flask_migrate/__init__.py index af6d991..a8a9f87 100644 --- a/flask_migrate/__init__.py +++ b/flask_migrate/__init__.py @@ -105,3 +105,9 @@ def downgrade(directory = None, revision = '-1', sql = False, tag = None): "Revert to a previous version" config = _get_config(directory) command.downgrade(config, revision, sql = sql, tag = tag) + +@MigrateCommand.option('-d', '--directory', dest = 'directory', default = None, help = "Migration script directory (default is 'migrations')") +def branches(directory = None): + "Lists revisions that have broken the source tree into two versions representing two independent sets of changes" + config = _get_config(directory) + command.branches(config)