Postgres adapter apply only one unique constraints when there are more than one tables with the same unique fields. #4608
Labels
db-postgres
@payloadcms/db-postgres
dependency-issue
The issue is in a dependency of payload - not payload itself
status: needs-triage
Possible bug which hasn't been reproduced yet
Link to reproduction
https://github.com/xiaohanyu/test-payload
Describe the Bug
Postgres only respect one unique constraints when more than one collections with the same unique fields.
To Reproduce
Steps to reproduce the bug:
npx create-payload-app@latest
, as of now, the latest payload app is 2.5.0npm run dev
Check postgres table,
You can see that
resumes
table has"title_idx" UNIQUE, btree (title)
wheretemplates
do not have this unique index, however, the title field in bothResumes
andTemplates
collection are the same:Payload Version
^2.0.0
Adapters and Plugins
db-postgres, bundler-webpack
The text was updated successfully, but these errors were encountered: