def format_index(index):
    """Convert Index to fixture format.
    """
    return {
        "fields": {
            "name": index.name,
            "table_id": index.table_id,
            "workspace_id": str(index.workspace_id),
            "created_at": str(index.created_at),
            "updated_at": str(index.updated_at),
            "object_id": index.object_id,
            "is_unique": index.is_unique,
            "is_primary": index.is_primary,
            "sql": index.sql,
        },
        "model": "definitions.index",
        "pk": index.pk,
    }