Example #1
0
def reset_db():
    """Empties the database and generates it again with db_setup"""
    from flask_migrate import upgrade
    db.drop_all()
    db.create_all()
    upgrade()
    create_test_user()
    recreate()
Example #2
0
def deploy():
    """
    Run deployment tasks.
    """

    # migrate database to latest revision
    upgrade()

    # pre-populate
    list(
        map(
            lambda x: x.populate(),
            (
                Roles,
                Agencies,
                Reasons,
                Users,
                LetterTemplates,
                EnvelopeTemplates,
                CustomRequestForms,
            ),
        ))
    recreate()
Example #3
0
def es_recreate():
    """
    Recreate elasticsearch index and request docs.
    """
    recreate()
Example #4
0
def es_recreate():
    """Recreate elasticsearch index and request docs."""
    from app.search.utils import recreate
    recreate()
Example #5
0
def es_recreate():
    """Recreates the index and request docs"""
    recreate()
def es_recreate():
    """
    Recreate elasticsearch index and request docs.
    """

    recreate()