From: Lucian Ursu Date: Fri, 22 Feb 2013 13:38:46 +0000 (+0200) Subject: Using a single task to sync the db and run migrations. X-Git-Tag: release-20150131~498^2~2^2~18 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ec84476fae299132a85d2f924bf0643d72caf5e3;p=oweals%2Fkarmaworld.git Using a single task to sync the db and run migrations. --- diff --git a/fabfile.py b/fabfile.py index 0629fe0..2285466 100755 --- a/fabfile.py +++ b/fabfile.py @@ -53,21 +53,8 @@ def prod(): ########## DATABASE MANAGEMENT @task def syncdb(): - """Run a syncdb.""" - local('%(run)s syncdb --noinput' % env) - - -@task -def migrate(app=None): - """Apply one (or more) migrations. If no app is specified, fabric will - attempt to run a site-wide migration. - - :param str app: Django app name to migrate. - """ - if app: - local('%s migrate %s --noinput' % (env.run, app)) - else: - local('%(run)s migrate --noinput' % env) + """Runs syncdb (along with any pending South migrations)""" + run('python manage.py syncdb --noinput --migrate') ########## END DATABASE MANAGEMENT