@task
def update_database(app=None):
    """
    Update the database (run the migrations)
    Usage: fab update_database:app_name
    """
    with virtualenv(env.virtualenv):
        with cd(env.code_dir):
            if getattr(env, 'initial_deploy', False):
                run_venv("./manage.py syncdb --all")
                run_venv("./manage.py migrate --fake --noinput")
            else:
                run_venv("./manage.py syncdb --noinput")
                if app:
                    run_venv(app % "./manage.py migrate %s --noinput")
                else:
                    run_venv("./manage.py migrate --noinput")
dataset/ETHPy150Open xenith/django-base-template/fabfile.py/update_database/swapped operands of `%`