(db-postgres): `enable_a_p_i_key` column syntax in Users database table
Link to reproduction
https://github.com/DapperMountain/payload-3-bun-template
Environment Info
Binaries:
Node: 22.2.0
npm: 10.7.0
Yarn: N/A
pnpm: N/A
Relevant Packages:
payload: 3.0.0-beta.97
next: 15.0.0-canary.104
@payloadcms/db-postgres: 3.0.0-beta.97
@payloadcms/email-nodemailer: 3.0.0-beta.97
@payloadcms/graphql: 3.0.0-beta.97
@payloadcms/next/utilities: 3.0.0-beta.97
@payloadcms/richtext-lexical: 3.0.0-beta.97
@payloadcms/translations: 3.0.0-beta.97
@payloadcms/ui/shared: 3.0.0-beta.97
react: 19.0.0-rc-e56f4ae3-20240830
react-dom: 19.0.0-rc-e56f4ae3-20240830
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:46 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6031
Available memory (MB): 36864
Available CPU cores: 14
Describe the Bug
When enabling API Key on a users collection (auth.useAPIKey = true) it creates a few columns in the collection database table. The column naming isn't consistent between the enable_a_p_i_key, api_key, and api_key_index columns. I would recommend changing enable_a_p_i_key to enable_api_key to align with the other column names.
Reproduction Steps
- Enable API Key on a users collection (
auth.useAPIKey = true) - Check the collection database table column names
enable_a_p_i_keywould better be namedenable_api_key
Adapters and Plugins
db-postgres
Looks like this might be related to the to-snake-case npm package. I'm assuming that the variable provided is enableAPIKey which would translate to a rather silly looking enable_a_p_i_key column name in the database.
My build was working, but this error started coming up out of no where on my v2 build. Any ideas?
same for thumbnail_u_r_l and SQLite
This issue has been marked as stale due to lack of activity.
To keep this issue open, please indicate that it is still relevant in a comment below.
Issue is still relevant in 3.59-3.60: seeing thumbnail_u_r_l with Postgres