P
Prisma8mo ago
audn

What's the correct way to fix this error?

I deleted my products table with almost 3 million records using DROP TABLE products CASCADE;. Then, when I tried to recreate the table with npx prisma migrate dev, Prisma raised these errors:
[-] Removed tables
- products

[*] Changed the `diaryEntryFoodProducts` table
[-] Removed foreign key on columns (foodProductId)

[*] Changed the `mealEntryFoodProducts` table
[-] Removed foreign key on columns (foodProductId)

[*] Changed the `products` table
[-] Removed foreign key on columns (addedByUserId)

[*] Changed the `userMadeServingSizes` table
[-] Removed foreign key on columns (foodProductId)
[-] Removed tables
- products

[*] Changed the `diaryEntryFoodProducts` table
[-] Removed foreign key on columns (foodProductId)

[*] Changed the `mealEntryFoodProducts` table
[-] Removed foreign key on columns (foodProductId)

[*] Changed the `products` table
[-] Removed foreign key on columns (addedByUserId)

[*] Changed the `userMadeServingSizes` table
[-] Removed foreign key on columns (foodProductId)
This happened on my local development database, and I do have a backup. However, I'm looking for a solution to fix this without relying on backups.
1 Reply
audn
audnOP8mo ago
Stack Overflow
How do you make prisma redeploy to a database after you've removed ...
I used prisma to generate the schema to a database, but due to changing an id column started getting errors. I deleted the tables and was going to redeploy the schema but I can't find a way to do t...
Want results from more Discord servers?
Add your server