Skip to content

Schema Migration Overriding exist Indexes #9112

Open
@badboy-tian

Description

@badboy-tian

New Issue Checklist

Issue Description

Schema Migration Overriding exist Indexes

Steps to reproduce

1.create some index in mongodb tools
image
2.define ExportTool class in schema

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: {},
    },
}

3.config the parse-server

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

image

Actual Outcome

when parse server running, the exist index has dispear

Expected Outcome

when parse server running, the exist index shoud not dispear

Environment

Server

  • Parse Server version: 7.0.0
  • Operating system: macos
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): local

Database

  • System (MongoDB or Postgres): mongodb
  • Database version: 7.0.8
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): local

Client

  • SDK (iOS, Android, JavaScript, PHP, Unity, etc): no
  • SDK version: no

Logs

info: 11:34:54 -> Node app is running on port: 1337
[TS] info: Running Migrations
[TS] info: Running Migrations Completed

Metadata

Metadata

Assignees

No one assigned

    Labels

    bounty:$20Bounty applies for fixing this issue (Parse Bounty Program)type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions