feat: add mii data properties to database and move uploads directory paths

This commit is contained in:
trafficlunar 2025-04-05 17:13:34 +01:00
parent 5de6e924f2
commit 37af539911
5 changed files with 25 additions and 31 deletions

View file

@ -1,3 +0,0 @@
-- AlterTable
ALTER TABLE "miis" ALTER COLUMN "qrCodeUrl" DROP NOT NULL,
ALTER COLUMN "studioUrl" DROP NOT NULL;

View file

@ -45,10 +45,12 @@ CREATE TABLE "miis" (
"id" SERIAL NOT NULL,
"userId" INTEGER NOT NULL,
"name" VARCHAR(64) NOT NULL,
"qrCodeUrl" TEXT NOT NULL,
"studioUrl" TEXT NOT NULL,
"images" TEXT[],
"tags" TEXT[],
"firstName" TEXT NOT NULL,
"lastName" TEXT NOT NULL,
"islandName" TEXT NOT NULL,
"allowedCopying" BOOLEAN NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "miis_pkey" PRIMARY KEY ("id")

View file

@ -61,13 +61,16 @@ model Session {
}
model Mii {
id Int @id @default(autoincrement())
userId Int
name String @db.VarChar(64)
qrCodeUrl String?
studioUrl String?
images String[]
tags String[]
id Int @id @default(autoincrement())
userId Int
name String @db.VarChar(64)
images String[]
tags String[]
firstName String
lastName String
islandName String
allowedCopying Boolean
createdAt DateTime @default(now())