Database-Layout

Das Datanbankschema wurde an das alte angepasst.
!!Hinzugefügt wurde 'User'!!
This commit is contained in:
rudi committed 2026-07-30 11:48:00 +02:00
1 parent 9aa94638d9
commit 4ccd860814
3 files changed
+82 -14

No files matched your search

+26 -3
View File
@@ -14,11 +14,34 @@ datasource db {
model User {
id Int @id @default(autoincrement())
email String @unique
username String @unique
password String
role String @default("user")
firstname String
lastname String?
name String?
}
model Song {
id Int @id @default(autoincrement())
title String @unique
songBookSongs SongBookSongs[]
}
model SongBook {
id Int @id @default(autoincrement())
title String @unique
language String
songBookSongs SongBookSongs[]
}
model SongBookSongs {
SongBookId Int
SongId Int
songNumber Int
song Song @relation(fields: [SongId], references: [id], onDelete: Cascade)
book SongBook @relation(fields: [SongBookId], references: [id], onDelete: Cascade)
@@id([SongBookId, SongId])
}