Unique key in PG
Hey guys, sorry I have a little dumb question here 🙂
I wanna know how to set my id field in my PG to auto increament.
Here's my schema;
Someone look this up please, not sure I've found the right docs yet.
6 Replies
This is the message in the console.log
Hum 🧐 what you write is good for me.
What is db_name?
Sorry for late response, @Raphaël M (@rphlmr) ⚡
The db_name is the actual db name (api_usage).
Thx.
There is a new drizzle orm release: https://github.com/drizzle-team/drizzle-orm/releases/tag/0.32.0
The serial should be replaced with a new thing. Do you think it is worth a try?
I will update https://drizzle.run to the latest version but I can’t reproduce this issue (note: it uses an other pg driver and not neon. Maybe it is a neon known issue?)
GitHub
Release 0.32.0 · drizzle-team/drizzle-orm
Release notes for [email protected] and [email protected]
It's not mandatory to upgrade both packages, but if you want to use the new features in both queries and migrations, you will need t...
Drizzle Run
Drizzle Run
Thank you. I will try the update, and hopefully that should fix it.
If it doesn't, I'd assume it's a neon issue.
take a look at the generated migrations too. Maybe this is an old (or actual) bug of Drizzle kit after a schema change and new migrations
I remember cases where some changes where not generated