Add song skip/displayname to schema

This commit is contained in:
jeffvli
2022-11-08 14:32:01 -08:00
parent e6bf71dcfe
commit a326355576
2 changed files with 24 additions and 8 deletions
@@ -0,0 +1,14 @@
/*
Warnings:
- A unique constraint covering the columns `[displayName]` on the table `User` will be added. If there are existing duplicate values, this will fail.
*/
-- AlterTable
ALTER TABLE "Song" ADD COLUMN "skip" BOOLEAN NOT NULL DEFAULT false;
-- AlterTable
ALTER TABLE "User" ADD COLUMN "displayName" TEXT;
-- CreateIndex
CREATE UNIQUE INDEX "User_displayName_key" ON "User"("displayName");
+10 -8
View File
@@ -57,14 +57,15 @@ model RefreshToken {
} }
model User { model User {
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
username String @unique displayName String? @unique
password String username String @unique
enabled Boolean @default(false) password String
isAdmin Boolean @default(false) enabled Boolean @default(false)
deviceId String @unique isAdmin Boolean @default(false)
createdAt DateTime @default(now()) deviceId String @unique
updatedAt DateTime @updatedAt createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
histories History[] histories History[]
albumArtistRatings AlbumArtistRating[] albumArtistRatings AlbumArtistRating[]
@@ -474,6 +475,7 @@ model Song {
artistName String? artistName String?
remoteId String remoteId String
remoteCreatedAt DateTime? remoteCreatedAt DateTime?
skip Boolean @default(false)
deleted Boolean @default(false) deleted Boolean @default(false)
createdAt DateTime @default(now()) createdAt DateTime @default(now())
updatedAt DateTime @updatedAt updatedAt DateTime @updatedAt