♻️ Switch to next-auth for handling authentication (#899)

This commit is contained in:
Luke Vella 2023-10-19 09:14:53 +01:00 committed by GitHub
parent 5f9e428432
commit 6fa66da681
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
65 changed files with 1514 additions and 1586 deletions

View file

@ -0,0 +1,28 @@
-- AlterTable
ALTER TABLE "users" ADD COLUMN "email_verified" TIMESTAMP(3),
ADD COLUMN "locale" TEXT,
ADD COLUMN "time_format" "time_format",
ADD COLUMN "time_zone" TEXT,
ADD COLUMN "week_start" INTEGER;
-- Copy user preferences from old table
UPDATE "users" u
SET
"time_zone" = up."time_zone",
"week_start" = up."week_start",
"time_format" = up."time_format"
FROM "user_preferences" up
WHERE u.id = up."user_id";
-- CreateTable
CREATE TABLE "verification_tokens" (
"identifier" TEXT NOT NULL,
"token" TEXT NOT NULL,
"expires" TIMESTAMP(3) NOT NULL
);
-- CreateIndex
CREATE UNIQUE INDEX "verification_tokens_token_key" ON "verification_tokens"("token");
-- CreateIndex
CREATE UNIQUE INDEX "verification_tokens_identifier_token_key" ON "verification_tokens"("identifier", "token");