gluestick/prisma/migrations/20230425043204_init/migration.sql

20 lines
615 B
MySQL
Raw Normal View History

2023-04-25 01:13:35 -04:00
-- CreateTable
CREATE TABLE "AuthTicket" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"username" TEXT,
"ticket" TEXT NOT NULL
);
-- CreateTable
CREATE TABLE "DiscordAuth" (
"id" TEXT NOT NULL PRIMARY KEY,
"authTicketId" INTEGER NOT NULL,
"accessToken" TEXT NOT NULL,
"refreshToken" TEXT NOT NULL,
"refreshAt" DATETIME NOT NULL,
CONSTRAINT "DiscordAuth_authTicketId_fkey" FOREIGN KEY ("authTicketId") REFERENCES "AuthTicket" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
-- CreateIndex
CREATE UNIQUE INDEX "DiscordAuth_authTicketId_key" ON "DiscordAuth"("authTicketId");