-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Schema Migration Overriding exist Indexes #9112
Comments
Thanks for opening this issue!
|
What is the expected behavior according to the defined schema docs? I couldn't any specific mention of this in the docs. |
@mtrezza I hope the "Schema Migration" doesn't overwrite the Index I created with the mongodb tool! |
@mtrezza because the follow can not create unique index
so i must create unique index in mongodb shell or mongodb tool.
the unique index created by mongodb shell was dispear.... Overriding ? |
Some behavior is not explicitly described for indexes in the docs. For example if you set Did you take a look at the code to investigate what the current behavior is regarding indexes, so we can update the docs with the status quo? Then we can think about what we want to change. |
@mtrezza yes, when set but because the index define in the define schema can not support create unique index, so we have to create unique index in mongodb tools. very inconvenient. is there any way to supprot this?
thank you |
And also for strict true or false whatever result the same[also with another options]. I debugged with changing options but the result will be the same: overrides indexes. @mtrezza |
Which one is true? |
perhaps there is a unknow bug. i set strict: false, the index also overrided , i do not know why |
@rgunindi yes, you are right |
any update ? |
Don't expect early action 😁 Will take so long time |
@rgunindi yes. i have to create schema use api, create index use mongodb shell |
I find anthor way to merge schema, and the indexs can not override
and then
if schema exist, call schema.update, or schema.save. |
New Issue Checklist
Issue Description
Schema Migration Overriding exist Indexes
Steps to reproduce
1.create some index in mongodb tools
2.define ExportTool class in schema
3.config the parse-server
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
7.0.0
macos
local
Database
mongodb
7.0.8
local
Client
no
no
Logs
The text was updated successfully, but these errors were encountered: