This commit is contained in:
2026-02-03 20:00:56 +08:00
parent c4a9247cad
commit d5dde77ee9
13 changed files with 409 additions and 147 deletions

View File

@@ -0,0 +1,12 @@
/*
Warnings:
- A unique constraint covering the columns `[username]` on the table `user` will be added. If there are existing duplicate values, this will fail.
*/
-- AlterTable
ALTER TABLE "user" ADD COLUMN "displayUsername" TEXT,
ADD COLUMN "username" TEXT;
-- CreateIndex
CREATE UNIQUE INDEX "user_username_key" ON "user"("username");

View File

@@ -1,3 +1,4 @@
generator client {
provider = "prisma-client"
output = "../generated/prisma"
@@ -21,8 +22,12 @@ model User {
dictionaryLookUps DictionaryLookUp[]
translationHistories TranslationHistory[]
username String?
displayUsername String?
@@unique([email])
@@map("user")
@@unique([username])
}
model Session {