I created the composite with one of the models as following:
type BountyCategory
@createModel(
accountRelation: LIST
description: "Join table for Bounty and Category"
)
{
bountyId: StreamID! @documentReference(model: "Bounty")
categoryId: StreamID! @documentReference(model: "Category")
bounty: Profile! @relationDocument(property: "bountyId")
category: Category! @relationDocument(property: "categoryId")
}
I tried to create indexes and re-create the composite
type BountyCategory
@createModel(
accountRelation: LIST
description: "Join table for Bounty and Category"
)
@createIndex(fields: [{ path: "bountyId" }])
@createIndex(fields: [{ path: "categoryId" }]) {
bountyId: StreamID! @documentReference(model: "Bounty")
categoryId: StreamID! @documentReference(model: "Category")
bounty: Profile! @relationDocument(property: "bountyId")
category: Category! @relationDocument(property: "categoryId")
}
The error below is thrown
{"error":"Schema verification failed for index: kjzl6hvfrbw6c7tyadfa1s7sbh6ac4671b5mz0le170e8djpvmc46oo7dkt2evn. Please make sure latest migrations have been applied.\n Missing Indices=[\"idx_oo7dkt2evn_bount\",\"idx_oo7dkt2evn_categ\"]\n Actual=[\"idx_idx_oo7dkt2evn_pkey\",\"constr_idx_oo7dkt2evn_unique\",\"idx_oo7dkt2evn_stream_id\",\"idx_oo7dkt2evn_last_anchored_at\",\"idx_oo7dkt2evn_first_anchored_at\",\"idx_oo7dkt2evn_created_at\",\"idx_oo7dkt2evn_updated_at\",\"idx_oo7dkt2evn_last_anchored_at_created_at\",\"idx_idx_oo7dkt2evn_custom_bountyId\",\"idx_idx_oo7dkt2evn_custom_categoryId\"]"}
at RemoteAdminApi.fetchJson [as _fetchJson]