You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reasons for using identity columns over serial are well discussed and easily searched and so I won't go into detail, but in short there are mild security, type protection, and DX concerns, and identity columns are in line with sql standards whereas serial is a bit more of a historical artifact.
meows
changed the title
bug: postgresql identity column officially recommended over serial
bug: PostgreSQL identity column officially recommended over serial
Sep 6, 2024
Provide environment information
This isn't an issue with any specific hardware or OS environment.
Describe the bug
Recent Drizzle now supports PostgreSQL identity columns. PostgreSQL officially recommends that identity columns be preferred over serial by default.
The reasons for using identity columns over serial are well discussed and easily searched and so I won't go into detail, but in short there are mild security, type protection, and DX concerns, and identity columns are in line with sql standards whereas serial is a bit more of a historical artifact.
Reproduction repo
https://github.com/meows/create-t3-app/tree/psql-identity-column
To reproduce
This is an issue with defaults running against PostgreSQL official recommendations. The issue is in the codebase.
Additional information
No response
The text was updated successfully, but these errors were encountered: