P
Prisma•3mo ago
Niels

Prisma keeps generating same migrations

Hmm, I am having some weird issue with my "Invoice" model.. whenever I generate a migration, it keeps adding these lines to the migrations, over and over... What could be the cause of this?
-- AlterTable
ALTER TABLE `Invoice` MODIFY `amountTotal` DOUBLE NOT NULL DEFAULT (round(`amountSubtotal` + `amountTax`, 2)),
MODIFY `displayId` VARCHAR(191) NOT NULL DEFAULT id;
-- AlterTable
ALTER TABLE `Invoice` MODIFY `amountTotal` DOUBLE NOT NULL DEFAULT (round(`amountSubtotal` + `amountTax`, 2)),
MODIFY `displayId` VARCHAR(191) NOT NULL DEFAULT id;
2 migrations, just created...
No description
No description
Solution:
Solution: After using prisma db pull I saw that the database returned these formulas without spaces, so I had to change those values in the prisma schema and now it seems to be okay 🙂
Jump to solution
1 Reply
Solution
Niels
Niels•3mo ago
Solution: After using prisma db pull I saw that the database returned these formulas without spaces, so I had to change those values in the prisma schema and now it seems to be okay 🙂
Want results from more Discord servers?
Add your server