audn
audn
PPrisma
Created by audn on 4/21/2024 in #help-and-questions
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.
2 replies