def METHOD_NAME(index, default_types, init_users, recreate_views, rebuild, lock_table):
    echo('Initialising database...')
    was_created = index.init_db(with_default_types=default_types,
                                with_permissions=init_users)
    if was_created:
        echo(style('Created.', bold=True))
    else:
        echo(style('Updated.', bold=True))
    echo('Checking indexes/views.')
    index.metadata_types.check_field_indexes(
        allow_table_lock=lock_table,
        rebuild_indexes=rebuild,
        rebuild_views=recreate_views or rebuild,
    )
    echo('Done.')