You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
507 B

11 months ago
  1. -- CreateTable
  2. CREATE TABLE "temporary_auth_tokens" (
  3. "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  4. "token" TEXT NOT NULL,
  5. "userId" INTEGER NOT NULL,
  6. "expiresAt" DATETIME NOT NULL,
  7. "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
  8. CONSTRAINT "temporary_auth_tokens_userId_fkey" FOREIGN KEY ("userId") REFERENCES "users" ("id") ON DELETE CASCADE ON UPDATE CASCADE
  9. );
  10. -- CreateIndex
  11. CREATE UNIQUE INDEX "temporary_auth_tokens_token_key" ON "temporary_auth_tokens"("token");