Closed ivan-kardash closed 1 month ago
We won't change how enum / table names are generated in the DB, also I think it works fine. In cases like this to get around you can use enumName
property for select / radio fields: https://payloadcms.com/docs/beta/fields/select#config-options
For example:
enumName: ({tableName}) => 'custom_enum_name',
For arrays / blocks / hasMany
select you can use dbName
instead.
This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.
Link to reproduction
No response
Environment Info
Describe the Bug
If the global has a schema like this:
I enough added several nested fields to achieve db length name restriction and get error like this:
I understand that the drizzle restricts it, and finally, it is restricted by PostgreSQL, in its turn. But it looks like a simple join of names to get tableName is not the best algorithm while we have a restriction of 63 characters.
Reproduction Steps
Create schema with total nested fields length of name more than 63 characters
Adapters and Plugins
db-postgres