diff --git a/prisma/migrations/20250107085603_add_metadata_to_credit_note/migration.sql b/prisma/migrations/20250107085603_add_metadata_to_credit_note/migration.sql new file mode 100644 index 0000000..a9936d3 --- /dev/null +++ b/prisma/migrations/20250107085603_add_metadata_to_credit_note/migration.sql @@ -0,0 +1,6 @@ +-- AlterTable +ALTER TABLE "CreditNote" ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, +ADD COLUMN "createdByUserId" TEXT; + +-- AddForeignKey +ALTER TABLE "CreditNote" ADD CONSTRAINT "CreditNote_createdByUserId_fkey" FOREIGN KEY ("createdByUserId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;