mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-01 18:21:52 +02:00
💳 Support payments with Stripe (#822)
This commit is contained in:
parent
969ae35971
commit
6f425edeaa
20 changed files with 712 additions and 229 deletions
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- A unique constraint covering the columns `[subscription_id]` on the table `users` will be added. If there are existing duplicate values, this will fail.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "users" ADD COLUMN "customer_id" TEXT,
|
||||
ADD COLUMN "subscription_id" TEXT;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "subscriptions" (
|
||||
"id" TEXT NOT NULL,
|
||||
"price_id" TEXT NOT NULL,
|
||||
"active" BOOLEAN NOT NULL,
|
||||
"currency" TEXT,
|
||||
"interval" TEXT,
|
||||
"interval_count" INTEGER,
|
||||
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"period_start" TIMESTAMP(3) NOT NULL,
|
||||
"period_end" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "subscriptions_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "users_subscription_id_key" ON "users"("subscription_id");
|
Loading…
Add table
Add a link
Reference in a new issue