Move migration to separate PR
parent
373b4bc88d
commit
48aa64e072
|
@ -1,15 +0,0 @@
|
||||||
/*
|
|
||||||
Warnings:
|
|
||||||
|
|
||||||
- You are about to drop the column `type` on the `Payment` table. All the data in the column will be lost.
|
|
||||||
|
|
||||||
*/
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE "Payment" DROP COLUMN "type",
|
|
||||||
ADD COLUMN "appId" TEXT;
|
|
||||||
|
|
||||||
-- DropEnum
|
|
||||||
DROP TYPE "PaymentType";
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE "Payment" ADD CONSTRAINT "Payment_appId_fkey" FOREIGN KEY ("appId") REFERENCES "App"("slug") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
|
@ -399,11 +399,15 @@ model ReminderMail {
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum PaymentType {
|
||||||
|
STRIPE
|
||||||
|
}
|
||||||
|
|
||||||
model Payment {
|
model Payment {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
uid String @unique
|
uid String @unique
|
||||||
app App? @relation(fields: [appId], references: [slug], onDelete: Cascade)
|
// TODO: Use an App relationship instead of PaymentType enum?
|
||||||
appId String?
|
type PaymentType
|
||||||
bookingId Int
|
bookingId Int
|
||||||
booking Booking? @relation(fields: [bookingId], references: [id], onDelete: Cascade)
|
booking Booking? @relation(fields: [bookingId], references: [id], onDelete: Cascade)
|
||||||
amount Int
|
amount Int
|
||||||
|
@ -521,7 +525,6 @@ model App {
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
updatedAt DateTime @updatedAt
|
updatedAt DateTime @updatedAt
|
||||||
credentials Credential[]
|
credentials Credential[]
|
||||||
payments Payment[]
|
|
||||||
Webhook Webhook[]
|
Webhook Webhook[]
|
||||||
ApiKey ApiKey[]
|
ApiKey ApiKey[]
|
||||||
enabled Boolean @default(false)
|
enabled Boolean @default(false)
|
||||||
|
|
Loading…
Reference in New Issue