HUB - Admin und Einstellungen Seiten hinzugefügt, Prisma Client Integration und Migrationen aktualisiert

This commit is contained in:
PxlLoewe
2025-02-16 01:09:33 +01:00
parent a4bdc94aa1
commit 62ae71d6b6
28 changed files with 862 additions and 234 deletions

View File

@@ -0,0 +1,19 @@
-- CreateTable
CREATE TABLE "discord_accounts" (
"id" SERIAL NOT NULL,
"user_id" TEXT NOT NULL,
"discord_id" TEXT NOT NULL,
"access_token" TEXT NOT NULL,
"refresh_token" TEXT NOT NULL,
"token_type" TEXT NOT NULL,
"scope" TEXT NOT NULL,
"guild_id" TEXT NOT NULL,
"guild_name" TEXT NOT NULL,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "discord_accounts_pkey" PRIMARY KEY ("id")
);
-- AddForeignKey
ALTER TABLE "discord_accounts" ADD CONSTRAINT "discord_accounts_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE;