jws-backend/prisma/migrations/20250113023733_add_debit_note/migration.sql

19 lines
604 B
MySQL
Raw Permalink Normal View History

/*
Warnings:
- You are about to drop the `DebitNote` table. If the table is not empty, all the data it contains will be lost.
*/
-- DropForeignKey
ALTER TABLE "DebitNote" DROP CONSTRAINT "DebitNote_quotationId_fkey";
-- AlterTable
ALTER TABLE "Quotation" ADD COLUMN "debitNoteQuotationId" TEXT,
ADD COLUMN "isDebitNote" BOOLEAN NOT NULL DEFAULT false;
-- DropTable
DROP TABLE "DebitNote";
-- AddForeignKey
ALTER TABLE "Quotation" ADD CONSTRAINT "Quotation_debitNoteQuotationId_fkey" FOREIGN KEY ("debitNoteQuotationId") REFERENCES "Quotation"("id") ON DELETE SET NULL ON UPDATE CASCADE;