Skip to content

Conversation

mtrezza
Copy link
Member

@mtrezza mtrezza commented Jul 28, 2020

(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.

  • (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 #6834

@mtrezza mtrezza marked this pull request as draft July 28, 2020 00:45
@mtrezza mtrezza requested review from dplewis and removed request for dplewis July 28, 2020 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Index on default field not created correctly
1 participant