-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Duplicate index error with similar field names #8752
Comments
DanRibbens
added a commit
that referenced
this issue
Oct 17, 2024
Fixes #8752 Previously, trying to define a config like this: ```ts { type: 'text', name: 'someText', index: true, }, { type: 'array', name: 'some', index: true, fields: [ { type: 'text', name: 'text', index: true, }, ], } ``` Lead to the error: ``` Warning We've found duplicated index name across public schema. Please rename your index in either the demonstration table or the table with the duplicated index name ``` Now, if we encounter duplicates, we increment the name like this: `collection_some_text_idx` `collection_some_text_1_idx` --------- Co-authored-by: Dan Ribbens <[email protected]>
Fixed in #8754 |
🚀 This is included in version v3.0.0-beta.116 |
This issue has been automatically locked. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the Bug
Collection with the following fields:
will cause an error
Warning We've found duplicated index name across public schema. Please rename your index in either the ... table or the table with the duplicated index name
because of similarity of names blocks.image and blocksImage
Link to the code that reproduces this issue
https://github.com/ars3nicum/payload-bug
Reproduction Steps
written above
Which area(s) are affected? (Select all that apply)
db-postgres
Environment Info
Payload: beta 114
Node.js: 22.9.0
Next.js: 15.0.0-canary.173
The text was updated successfully, but these errors were encountered: