Replies: 5 comments 2 replies
-
I highly recommend an option to "map" different fields to different database names, so I have a group field called "generalMechanicalInfo", I should be able to "alias that" to gmi or something in postgres, so I dont exceed the 63 limit |
Beta Was this translation helpful? Give feedback.
-
Hey @TomDo1234 — this is indeed on our radar and we will be launching support for overriding / manually specifying table names in the very near future to dodge this. As for now, there's nothing we can do to prevent this but the fix, as you mentioned, will solve for this 100%. I will convert this to a Feature Request so we can track progress on this feature accordingly and keep you updated. Keep an eye out - will have more for you shortly! |
Beta Was this translation helpful? Give feedback.
-
in the mean time its giving me this when I try to rename... How do I navigate this? Do i need a different terminal? |
Beta Was this translation helpful? Give feedback.
-
Look at this open source contribution happening here, #4525 🍾 |
Beta Was this translation helpful? Give feedback.
-
this change also makes it easier when switching from other systems to payload (e.g. switching basic apps/models from prisma to payload/drizzle) to accommodate the table structure of legacy apps. |
Beta Was this translation helpful? Give feedback.
-
Link to reproduction
Explained below
To Reproduce
Create a collection with nested fields, lets say a group field with some array fields inside that have select fields.
Observe that postgres enum type will become super long due to this. Possibly exceeding 63 characters, then you are screwed because during dev your schema will always "try to change" because it will try to change from the short name to the true long name, example below
You're about to change unit column type from enum_car_models_general_mechanical_info_width_with_folded_mirro to enum_car_models_general_mechanical_info_width_with_folded_mirrors_unit with 654 items
"enum_car_models_general_mechanical_info_width_with_folded_mirro" is 63 characters, because its trying to name itself enum_car_models_general_mechanical_info_width_with_folded_mirrors_unit but gets cut off at the 63rd character
Describe the Bug
Explained above
Payload Version
2.0.0
Adapters and Plugins
Postgres and Vite bundler
Beta Was this translation helpful? Give feedback.
All reactions