I tried to use @createIndex with @loadModel on a model, which is not created on the node
then i get the following error:
Schema verification failed for index: kjzl6hvfrbw6c5k700w9ff9o7y243g2wifpx9bdmdrvnjteu3annxfd3kljtp6w. Please make sure latest migrations have been applied.
then i dig the source a little and found this
it check whether the field is indexed in mid table of the node’s pg.
so, @createIndex must be used on the same node the model is created, and @createIndex is applied to the same field while @createModel?
or if we startIndex of a model(NOT created on this node), and manually set the index field of mid table, then @createIndex would work?
I think, when using @createIndex with @loadModel, if the field was NOT indexed in the mid table, setup the index(as create model does), might be an better option?