Permalink
Browse files

add option to create tracking table in db if not exists yet

  • Loading branch information...
1 parent de08594 commit 62adcbb6d52587718c46fb1ede2f349f90839729 @piranha committed Sep 9, 2013
Showing with 10 additions and 3 deletions.
  1. +9 −2 nomad/__init__.py
  2. +1 −1 setup.py
View
@@ -100,11 +100,18 @@ def create(name,
@app.command()
def apply(all=('a', False, 'apply all available migrations'),
- *names,
- **opts):
+ init=('', False, 'init if not initialized yet'),
+ *names,
+ **opts):
'''Apply migration and all of it dependencies
'''
repo = opts['repo']
+ if init:
+ try:
+ repo.init_db()
+ except DBError:
+ pass
+
if names:
migrations = map(repo.get, names)
elif all:
View
@@ -25,7 +25,7 @@ def read(fname):
description = 'simple sql migration tool to save you from becoming mad',
long_description = read('README.rst'),
license = 'BSD',
- version = '1.0',
+ version = '1.1',
author = 'Alexander Solovyov',
author_email = 'alexander@solovyov.net',
url = 'http://github.com/piranha/nomad/',

0 comments on commit 62adcbb

Please sign in to comment.