Update docs; Add invites to db
This commit is contained in:
parent
4f08e4d57f
commit
2fc0f9c404
4 changed files with 70 additions and 34 deletions
17
prisma/migrations/20251224120739_invites/migration.sql
Normal file
17
prisma/migrations/20251224120739_invites/migration.sql
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
-- CreateTable
|
||||
CREATE TABLE "Invite" (
|
||||
"id" TEXT NOT NULL,
|
||||
"communityId" TEXT,
|
||||
"totalInvites" INTEGER NOT NULL DEFAULT 0,
|
||||
"remainingInvites" INTEGER NOT NULL DEFAULT 0,
|
||||
"creationDate" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"expirationDate" TIMESTAMP(3),
|
||||
|
||||
CONSTRAINT "Invite_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "Invite_id_key" ON "Invite"("id");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "Invite" ADD CONSTRAINT "Invite_communityId_fkey" FOREIGN KEY ("communityId") REFERENCES "Community"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
Loading…
Add table
Add a link
Reference in a new issue