def METHOD_NAME(app):
    with app.app_context():
        db.session.close()
        db.drop_all()
        drop_alembic_version_table()
        alembic = Alembic(app=app)
        alembic.upgrade()
        list(current_search.delete(ignore=[404]))
        list(current_search.create(ignore=[400]))
        current_search.flush_and_refresh('records-hep')
        init_all_storage_paths()
        init_users_and_permissions()