summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlly Cope <olly@ollycope.com>2016-06-08 09:05:02 +0000
committerOlly Cope <olly@ollycope.com>2016-06-08 09:05:02 +0000
commitcd3a96999f4bb551d7e538d72139ca03d9c719ea (patch)
tree0384fb9d326f6143d845443d428e9c1b395e6616
parent4183a23a8fcec04c4f5112578d403d310639c032 (diff)
downloadyoyo-cd3a96999f4bb551d7e538d72139ca03d9c719ea.tar.gz
Config: make sure migration_table option is loaded
Fixes issue #19
-rwxr-xr-xCHANGELOG.rst7
-rwxr-xr-xyoyo/scripts/main.py1
-rw-r--r--yoyo/tests/test_cli_script.py4
3 files changed, 11 insertions, 1 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index c191bff..6b17d98 100755
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,6 +1,13 @@
CHANGELOG
---------
+5.0.2
+~~~~~
+
+* Bugfix: make sure that the migration_table option is read from the config
+ file (thanks to Frederik Holljen for the report and Manolo Micozzi for the
+ fix)
+
5.0.1 (released 2015-11-13)
~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/yoyo/scripts/main.py b/yoyo/scripts/main.py
index e564872..4142c03 100755
--- a/yoyo/scripts/main.py
+++ b/yoyo/scripts/main.py
@@ -58,6 +58,7 @@ def parse_args(argv=None):
'sources': 'get',
'database': 'get',
'verbosity': 'getint',
+ 'migration_table': 'get',
}
globalparser, argparser, subparsers = make_argparser()
diff --git a/yoyo/tests/test_cli_script.py b/yoyo/tests/test_cli_script.py
index d9a247e..51106a8 100644
--- a/yoyo/tests/test_cli_script.py
+++ b/yoyo/tests/test_cli_script.py
@@ -215,10 +215,12 @@ class TestArgParsing(TestInteractiveScript):
def test_it_uses_config_file_defaults(self):
self.writeconfig(sources='/tmp/migrations',
- database='postgresql:///foo')
+ database='postgresql:///foo',
+ migration_table='my_migrations')
_, _, args = parse_args(['apply'])
assert args.database == 'postgresql:///foo'
assert args.sources == ['/tmp/migrations']
+ assert args.migration_table == 'my_migrations'
def test_it_uses_interpolated_values_from_config(self):
self.writeconfig(sources='%(here)s/migrations')