DT
Drizzle Team•9mo ago
ethan

unable to use migrations

hey, im trying to run a migration and i keep getting this error. generating the json file worked just fine. i pasted the code and error below. any help would be appreciated, ty!
No description
No description
20 Replies
ethan
ethanOP•9mo ago
fixed that error but now im getting this
No description
Naeemgg
Naeemgg•9mo ago
can you show db and client file maybe something is off there
Mykhailo
Mykhailo•9mo ago
@ethan do you get this error when you run migrations? Could you please provide migration code?
ethan
ethanOP•9mo ago
No description
ethan
ethanOP•9mo ago
yep only when i run migrations. generating works fine though. what do you mean by the migration code? this is the js im using for that but if you mean the sql file thats generated lmk
No description
Naeemgg
Naeemgg•9mo ago
You can use try catch within migrateDB and just call it after Can you successfully run drizzle-kit generate:pg
ethan
ethanOP•9mo ago
yes it works for me
No description
Naeemgg
Naeemgg•9mo ago
drizzle-kit introspect:pg ?
ethan
ethanOP•9mo ago
also works
No description
Naeemgg
Naeemgg•9mo ago
🤔 You got connection string right Then what could possibly the cause Have you tried to delete and reinstall node modules?? Sometimes it does the job
ethan
ethanOP•9mo ago
yep ive tried deleting the whole project and recloning and my friend is also getting the error on his end connection string should be right drizzle is working fine for CRUD
Naeemgg
Naeemgg•9mo ago
Just to be clear, you're using postgres on localhost right?
ethan
ethanOP•9mo ago
yeah but im not hosting the db locally im using supabase
Naeemgg
Naeemgg•9mo ago
Let me try it with supabase I've tried with every driver except supabase and node
ethan
ethanOP•9mo ago
gotcha im honestly just following this tutorial 1s
ethan
ethanOP•9mo ago
Drizzle ORM - Migrate from Prisma to Drizzle
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
ethan
ethanOP•9mo ago
step 4 is where im stuck at
variable_name
variable_name•8mo ago
Hey, how did you solve this problem? I'm running into same issue.
Naeemgg
Naeemgg•8mo ago
supabase?
variable_name
variable_name•8mo ago
It's fixed. There were some issues with environment variables in turbo repo.
Want results from more Discord servers?
Add your server