Skip to content

Commit

Permalink
created and applied migrations for payments table
Browse files Browse the repository at this point in the history
  • Loading branch information
roskzhu committed May 26, 2024
1 parent 7b5d5fd commit c0059c6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-- CreateEnum
CREATE TYPE "PaymentStatus" AS ENUM ('PAID', 'PROCESSING', 'UNPAID', 'DENIED');

-- CreateTable
CREATE TABLE "Payment" (
"id" SERIAL NOT NULL,
"stripePaymentId" TEXT NOT NULL,
"creationDate" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updateDate" TIMESTAMP(3) NOT NULL,
"donation_id" INTEGER NOT NULL,
"amount" INTEGER NOT NULL,
"currency" TEXT NOT NULL,
"status" "PaymentStatus" NOT NULL,

CONSTRAINT "Payment_pkey" PRIMARY KEY ("id")
);

-- CreateIndex
CREATE UNIQUE INDEX "Payment_stripePaymentId_key" ON "Payment"("stripePaymentId");
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-- This is an empty migration.

0 comments on commit c0059c6

Please sign in to comment.