Peter Boling
DTDrizzle Team
•Created by nr7751 on 2/26/2024 in #help
Can someone direct me to a UUID implementation as PK with Drizzle ORM?
@nr7751 I described my solution over on the Lucia discord: https://discord.com/channels/1004048134218981416/1219330483796574270/1219342383918092318
25 replies
DTDrizzle Team
•Created by nr7751 on 2/26/2024 in #help
Can someone direct me to a UUID implementation as PK with Drizzle ORM?
Probably best to start there, the performance difference won't matter until you hit millions of users!
25 replies
DTDrizzle Team
•Created by nr7751 on 2/26/2024 in #help
Can someone direct me to a UUID implementation as PK with Drizzle ORM?
No, if you are using text it will just work 🙂
25 replies
DTDrizzle Team
•Created by nr7751 on 2/26/2024 in #help
Can someone direct me to a UUID implementation as PK with Drizzle ORM?
I did end up getting everything working, except for the session id. All my other IDs are now uuid, and they are v7 when generated by Javascript clients, and v4 when generated by the database.
25 replies
DTDrizzle Team
•Created by nr7751 on 2/26/2024 in #help
Can someone direct me to a UUID implementation as PK with Drizzle ORM?
The issue is that Drizzle + Lucia doesn't allow me to override the type of the session id (they only just added the ability to override the type of the user id).
25 replies
DTDrizzle Team
•Created by nr7751 on 2/26/2024 in #help
Can someone direct me to a UUID implementation as PK with Drizzle ORM?
uuidv7 is binary format compatible with the older uuid formats, so I can store a uuidv7 inside a uuid field from
uuid-ossp
25 replies
DTDrizzle Team
•Created by nr7751 on 2/26/2024 in #help
Can someone direct me to a UUID implementation as PK with Drizzle ORM?
I want to use either
ulid
or uuidv7
25 replies
DTDrizzle Team
•Created by nr7751 on 2/26/2024 in #help
Can someone direct me to a UUID implementation as PK with Drizzle ORM?
uuid
is a native binary type with the postgresql extension uuid-ossp
, but it only ships with a generator for UUID v1, v3, v4, and v525 replies
DTDrizzle Team
•Created by nr7751 on 2/26/2024 in #help
Can someone direct me to a UUID implementation as PK with Drizzle ORM?
I specifically am attempting to avoid using a text field as that bloats the size of the key immensely. I want it to be binary.
25 replies
DTDrizzle Team
•Created by Jonas on 2/29/2024 in #help
ClientAuthentication Error using heroku-postgres
Figured it out!
I had to set
sslmode=require
, or ssl: true
, everywhere possible, and then it suddenly started working! It appears this is now required by Heroku always.
https://devcenter.heroku.com/articles/connecting-heroku-postgres#heroku-postgres-ssl
More: https://devcenter.heroku.com/changelog-items/203510 replies
DTDrizzle Team
•Created by polkovnik on 7/27/2023 in #help
Introspect failing no pg_hba.conf entry for host
6 replies
DTDrizzle Team
•Created by polkovnik on 7/27/2023 in #help
Introspect failing no pg_hba.conf entry for host
I had to set
sslmode=require
, or ssl: true
, everywhere possible, and then it suddenly started working! It appears this is now required by Heroku always.
https://devcenter.heroku.com/articles/connecting-heroku-postgres#heroku-postgres-ssl6 replies
DTDrizzle Team
•Created by polkovnik on 7/27/2023 in #help
Introspect failing no pg_hba.conf entry for host
Struggling with the same thing, but adding
?sslmode=no-verify
hasn't worked yet6 replies
DTDrizzle Team
•Created by Jonas on 2/29/2024 in #help
ClientAuthentication Error using heroku-postgres
I'm struggling with the same thing
10 replies
DTDrizzle Team
•Created by nr7751 on 2/26/2024 in #help
Can someone direct me to a UUID implementation as PK with Drizzle ORM?
And this is the migrate script (
src/lib/db/db_migrate.server.ts
):
25 replies
DTDrizzle Team
•Created by nr7751 on 2/26/2024 in #help
Can someone direct me to a UUID implementation as PK with Drizzle ORM?
25 replies
DTDrizzle Team
•Created by nr7751 on 2/26/2024 in #help
Can someone direct me to a UUID implementation as PK with Drizzle ORM?
I am having the same issue. I am able to run
generate:pg
and push:pg
without issue using code like you gave @Blixkreeg .
However, when I use the example code from the running migrations docs I get an error, same as @nr7751 did.25 replies
DTDrizzle Team
•Created by Peter Boling on 2/23/2024 in #help
How to Squash Migrations?
✨ Solution! ✨
My scripts:
My
src/lib/db/setup.server.ts
is in this gist: https://gist.github.com/pboling/f831235a1f3c5627f0341c4bbcf37ea9#file-setup-server-ts3 replies
DTDrizzle Team
•Created by Peter Boling on 2/23/2024 in #help
How to Squash Migrations?
Indeed, searching this discord for "squash" has zero hits 🥹
3 replies