Error while using pulling schemas using drizzle-kit

Hey team, I have a doubt regarding the setup 🙂 - My setup is based on drizzle(postgres) + supabase + next-JS 14. So my doubt is : I successfully created migrations (initial-no data). and since its on supabase, thought to add a stripe-subscription template 🙂. Although in supabase, i can see the newly added tables, when is use pnpm drizzle-kit pull to update my local schema, it shows the following error : Searched the web, and even dived into the drizzle-kit code (😐) , but couldn't find a fix. ! Is it because, i am pulling from an empty table or is there something wrong.. ? Tried to pull each individual tables (pnpm drizzle-kit pull --dialect=postgresql --url=postgresql://postgres.bxlseovkecltfxpbnjus:[]@aws-0-ap-southeast-1.pooler.supabase.com:6543/postgres --out=./db/schema.ts ) , - it successfully pulls each individual schema. But when tried to pull all together, throws an error 😐
No description
4 Replies
4nZ
4nZOP2mo ago
On commenting out that particular line 😅, it throws the following error :
No description
[object Object]
[object Object]2mo ago
@4nZ are you using custom indexes? they seem to be working badly with drizzle when it attempts to pull them
4nZ
4nZOP2mo ago
Nope . - The thing is, i can retrieve the schemas individually, into a folder, using the above command. - But then each time i run the command it replaces all the schema with the new one. So that is not a relevant option. - If pull 'ed all the schemas together then i get the error, above ok, i think i found the mistake : the 'pg' package wasn't installed. After adding the package, i ran pnpm drizzle-kit pull and got the schema's coming in all-together. 👍👍 It seems like the 'pg' driver was needed for database querying
[object Object]
[object Object]2mo ago
either pg or postgres needs to be installed to run drizzle-kit commands yeah
Want results from more Discord servers?
Add your server