Database-Layout
Das Datanbankschema wurde an das alte angepasst. !!Hinzugefügt wurde 'User'!!
This commit is contained in:
1 parent
9aa94638d9
commit
4ccd860814
3 files changed
+82
-14
No files matched your search
+26
-3
@@ -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])
|
||||
}
|
||||
Reference in new issue
Block a user