Why the index dispear?

I create many index in mongodb tools.


and i define ExportTool class in schema formate

export const ExportTotal = {
    className: "ExportTotal",
    fields: {
        myid: {type: "Number", defaultValue: 0},
        money: {type: "Number", defaultValue: 0},
        type: {type: "String"},
        user: {type: "Pointer", targetClass: "_User"},
    },
    
    classLevelPermissions: {
        find: {},
        count: {},
        get: {},
        update: {},
        create: {},
        delete: {},
        protectedFields: {},
    },
}

and then i config the schema in app start

schema: {
        definitions:[ExportTool],
        lockSchemas: false,
        strict: true,
        recreateModifiedFields: true,
        deleteExtraFields: true,
    },

and then the index dispear! why? thank you for reply

please help me…

Seems to override the index part, currently, you should not use the migration feature. I think you can open an issue

@rgunindi Schema Migration Overriding exist Indexes · Issue #9112 · parse-community/parse-server · GitHub

1 Like