Skip to content

Commit

Permalink
Merge pull request #58 from Schroedinger-Hat/feat/56/membership-templ…
Browse files Browse the repository at this point in the history
…ate-support

MembershipTemplates are displayed in products
  • Loading branch information
LobeTia authored Sep 30, 2024
2 parents dfda02a + 5f55830 commit d9969bc
Show file tree
Hide file tree
Showing 15 changed files with 870 additions and 440 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.12.0
lts/iron
214 changes: 210 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@
"dev:email": "npx dotenv-run-script dev:email-noenv",
"dev:email-noenv": "email dev --dir src/emails",
"postinstall": "prisma generate",
"lint": "next lint",
"lint:fix": "next lint --fix",
"lint": "next lint && prisma validate",
"lint:fix": "next lint --fix && prisma format",
"start": "next start",
"ragequit": "rm -rf .next && npm run db:push && npm run dev"
},
"prisma": {
"seed": "tsx prisma/seeds/index.ts"
},
"dependencies": {
"@auth/prisma-adapter": "^1.4.0",
"@hookform/resolvers": "^3.3.4",
Expand All @@ -30,6 +33,7 @@
"@radix-ui/react-dropdown-menu": "^2.0.6",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-scroll-area": "^1.0.5",
"@radix-ui/react-select": "^2.0.0",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-toast": "^1.1.5",
Expand Down Expand Up @@ -57,7 +61,7 @@
"devDependencies": {
"@types/eslint": "^8.56.2",
"@types/lodash": "^4.17.0",
"@types/node": "^20.11.20",
"@types/node": "^20.12.x",
"@types/nodemailer": "^6.4.14",
"@types/react": "^18.2.57",
"@types/react-dom": "^18.2.19",
Expand All @@ -73,6 +77,7 @@
"prisma": "^5.10.2",
"tailwindcss": "^3.4.1",
"tailwindcss-animate": "^1.0.7",
"tsx": "^4.7.2",
"typescript": "^5.4.2"
},
"ct3aMetadata": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ CREATE TABLE "MembershipTemplate" (
"priceUnit" "PriceUnit" NOT NULL DEFAULT 'EUR',
"stripePriceId" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL;
"updatedAt" TIMESTAMP(3) NOT NULL,

CONSTRAINT "MembershipTemplate_pkey" PRIMARY KEY ("id")
);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-- CreateIndex
CREATE UNIQUE INDEX "User_stripeCustomerId_key" ON "User"("stripeCustomerId");

-- AddForeignKey
ALTER TABLE "Membership" ADD COLUMN "membershipTemplateId" TEXT NOT NULL;
ALTER TABLE "Membership" ADD CONSTRAINT "Membership_membershipTemplateId_fkey" FOREIGN KEY ("membershipTemplateId") REFERENCES "MembershipTemplate"("id") ON DELETE CASCADE ON UPDATE CASCADE;
Loading

0 comments on commit d9969bc

Please sign in to comment.