Пример #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()
Пример #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()
Пример #3
0
def es_recreate():
    """
    Recreate elasticsearch index and request docs.
    """
    recreate()
Пример #4
0
def es_recreate():
    """Recreate elasticsearch index and request docs."""
    from app.search.utils import recreate
    recreate()
Пример #5
0
def es_recreate():
    """Recreates the index and request docs"""
    recreate()
Пример #6
0
def es_recreate():
    """
    Recreate elasticsearch index and request docs.
    """

    recreate()