Changes sessions to be stored in the DB, this ensures that sessions persist after a restart!

This commit is contained in:
Cameron Redmore 2025-04-25 13:03:25 +01:00
parent 83d93aefc0
commit 1f9bb34853
5 changed files with 103 additions and 30 deletions

View file

@ -0,0 +1,12 @@
-- CreateTable
CREATE TABLE "Session" (
"id" TEXT NOT NULL,
"sid" TEXT NOT NULL,
"data" TEXT NOT NULL,
"expires_at" TIMESTAMP(3) NOT NULL,
CONSTRAINT "Session_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "Session_sid_key" ON "Session"("sid");