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!
20 Replies
fixed that error but now im getting this
can you show db and client file
maybe something is off there
@ethan do you get this error when you run migrations? Could you please provide migration code?
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
You can use try catch within migrateDB and just call it after
Can you successfully run
drizzle-kit generate:pg
yes it works for me
drizzle-kit introspect:pg
?
also works
🤔
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
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
Just to be clear, you're using postgres on localhost right?
yeah but im not hosting the db locally
im using supabase
Let me try it with supabase
I've tried with every driver except supabase and node
gotcha
im honestly just following this tutorial
1s
Drizzle ORM - Migrate from Prisma to Drizzle
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
step 4 is where im stuck at
Hey, how did you solve this problem? I'm running into same issue.
supabase?
It's fixed. There were some issues with environment variables in turbo repo.