-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
created and applied migrations for payments table
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
backend/typescript/prisma/migrations/20240526175138_create_payments_table/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); |
1 change: 1 addition & 0 deletions
1
backend/typescript/prisma/migrations/20240526175607_create_payments_table/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-- This is an empty migration. |