-- Local app account for reviewer/admin login.
-- Password is stored as a server-side hash, never as plaintext.
CREATE TABLE "AppAccount" (
  "id" TEXT NOT NULL PRIMARY KEY,
  "username" TEXT NOT NULL,
  "passwordHash" TEXT,
  "passwordSetAt" DATETIME,
  "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
  "updatedAt" DATETIME NOT NULL
);

CREATE UNIQUE INDEX "AppAccount_username_key" ON "AppAccount"("username");

