parse-server
parse-server copied to clipboard
fixed index creation on default field
(1) This fixed a bug where index creation with the schema update endpoint was not possible for default fields, because the index field names were not transformed to their internal names, e.g. createdAt -> _created_at.
(2) However, this does not fix the issue that the schema still returns the internal index field names when being read. That means with this PR, a schema update request with index { createdAt: 1 } creates an index { _created_At: 1 } and the call also returns the index as { _created_At: 1 } instead of as { createdAt: 1 }. ~~This should probably be corrected as some point for consistency.~~ This needs to be corrected because the test is failing for Postgres otherwise.
- [x] (1) transform index from non-internal name to internal name when creating
- [ ] (2) transform index from internal name to non-internal name when retrieving the schema
closes https://github.com/parse-community/parse-server/issues/6834