nu
DTDrizzle Team
•Created by nu on 2/13/2025 in #help
How to handle multiple unique constraints with onConflictDoUpdate?
Hey thanks for the help and example.
Yes you are right about the array. This did occur to me but it feels like an unnecessarily complex operation when upsert exists. On the other hand, haven't found theany other safe way to do this.
I will update here if I find something.
5 replies
DTDrizzle Team
•Created by loup on 2/17/2025 in #help
try to push : schema "XXX" does not exist
Oops didn't see your response ahaha
5 replies
DTDrizzle Team
•Created by loup on 2/17/2025 in #help
try to push : schema "XXX" does not exist
I may be wrong but I think push doesn't create new schema, only uses it.
You either have to create it separately or maybe use
drizzle-kit generate
and then migrate (provided you see the CREATE SCHEMA
line in generated migrations).5 replies
DTDrizzle Team
•Created by nu on 2/13/2025 in #help
How to handle multiple unique constraints with onConflictDoUpdate?
You are right, it can be an array. This may be fine to handle
unique_game
constraint. But again, now how to handle the unique_id
constraint. It is one or the other again.5 replies
DTDrizzle Team
•Created by nu on 2/5/2025 in #help
Changing postgres timestamp mode (string -> date) isn't reflected in migrations
Okay that makes sense. That's why no migrations are generated. Drizzle then probably has no way to know from schema pull. Pefect. Thanks a lot for the help.
Although being shown the wrong value after pull is confusing. They should just omit the field.
Sorry for delay in reply, didn't get your notification.
4 replies
DTDrizzle Team
•Created by andreas_444 on 1/30/2025 in #help
Timestamp mode as date while drizzle-kit pull
Thanks for letting me know.
5 replies
DTDrizzle Team
•Created by andreas_444 on 1/30/2025 in #help
Timestamp mode as date while drizzle-kit pull
Hi. Did you find a solution to this? My original schema has mode
date
but on pull the timestamp has mode string
. Strange5 replies
DTDrizzle Team
•Created by nu on 2/5/2025 in #help
Changing postgres timestamp mode (string -> date) isn't reflected in migrations
One more thing I noticed is:
I reset the local db (
supabase db reset
), generated/applied the migrations again (with mode: 'date'
).
Now elsewhere when I pull schema (drizzle-kit pull
), they still have mode: 'string'
. Very confused now!4 replies
DTDrizzle Team
•Created by nu on 12/7/2024 in #help
How to add comment on postgres table columns (and other one-time operations like add trigger)
Hi @François . Thanks for the help.
No at this point I don't have the up function. I only have my tables defined.
The link you shared looks like a good idea (probably that's how I will do it). Although this will loose track of a timeline of changes in git I assume, which was one of my goals behind using an ORM.
I assume the
migrate()
function mustn't track changes in a migration file? (say I create a stored proc with custom mig file and update the same file to update the stored proc)4 replies