def deploy():
    print(green("Deploying to %s" % env.host))
    maintenance_on()
    backup()
    pull()
    cleanup()
    migrate_on()
    if "test" in env.host:
        db_sync()
    else:
        db_upgrade()
        # Step 3: Allow web2py to run the Eden model to configure the Database structure
        migrate()
        # Do the actual DB upgrade
        # (split into a separate function to allow it to easily be run manually if there is a problem with the previous step)
        db_upgrade_()
    migrate_off()
    optimise()
    maintenance_off()
Start services that should be stopped during initial provisioning.
dataset/ETHPy150Open sahana/eden/static/scripts/tools/fabfile.py/deploy--crossover with--dataset/ETHPy150Open winhamwr/neckbeard/neckbeard/brain_wrinkles/base.py/BaseProvisioner.start_services