added oauth Route

This commit is contained in:
PxlLoewe
2025-02-02 19:42:42 +01:00
parent 29f9cd7941
commit edcad748fb
23 changed files with 799 additions and 161 deletions

View File

@@ -0,0 +1,14 @@
-- CreateTable
CREATE TABLE "oauth_tokens" (
"id" SERIAL NOT NULL,
"user_id" INTEGER NOT NULL,
"client_id" TEXT NOT NULL,
"access_token" TEXT NOT NULL,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "oauth_tokens_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "oauth_tokens_access_token_key" ON "oauth_tokens"("access_token");

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "oauth_tokens" ALTER COLUMN "user_id" SET DATA TYPE TEXT;