mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-27 04:07:25 +01:00
110 lines
2.1 KiB
Rust
110 lines
2.1 KiB
Rust
|
|
table! {
|
||
|
|
ensembles (id) {
|
||
|
|
id -> BigInt,
|
||
|
|
name -> Text,
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
table! {
|
||
|
|
instrumentations (id) {
|
||
|
|
id -> BigInt,
|
||
|
|
work -> BigInt,
|
||
|
|
instrument -> BigInt,
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
table! {
|
||
|
|
instruments (id) {
|
||
|
|
id -> BigInt,
|
||
|
|
name -> Text,
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
table! {
|
||
|
|
part_instrumentations (id) {
|
||
|
|
id -> BigInt,
|
||
|
|
work_part -> BigInt,
|
||
|
|
instrument -> BigInt,
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
table! {
|
||
|
|
performances (id) {
|
||
|
|
id -> BigInt,
|
||
|
|
recording -> BigInt,
|
||
|
|
person -> Nullable<BigInt>,
|
||
|
|
ensemble -> Nullable<BigInt>,
|
||
|
|
role -> Nullable<BigInt>,
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
table! {
|
||
|
|
persons (id) {
|
||
|
|
id -> BigInt,
|
||
|
|
first_name -> Text,
|
||
|
|
last_name -> Text,
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
table! {
|
||
|
|
recordings (id) {
|
||
|
|
id -> BigInt,
|
||
|
|
work -> BigInt,
|
||
|
|
comment -> Text,
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
table! {
|
||
|
|
work_parts (id) {
|
||
|
|
id -> BigInt,
|
||
|
|
work -> BigInt,
|
||
|
|
part_index -> BigInt,
|
||
|
|
composer -> Nullable<BigInt>,
|
||
|
|
title -> Text,
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
table! {
|
||
|
|
work_sections (id) {
|
||
|
|
id -> BigInt,
|
||
|
|
work -> BigInt,
|
||
|
|
title -> Text,
|
||
|
|
before_index -> BigInt,
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
table! {
|
||
|
|
works (id) {
|
||
|
|
id -> BigInt,
|
||
|
|
composer -> BigInt,
|
||
|
|
title -> Text,
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
joinable!(instrumentations -> instruments (instrument));
|
||
|
|
joinable!(instrumentations -> works (work));
|
||
|
|
joinable!(part_instrumentations -> instruments (instrument));
|
||
|
|
joinable!(part_instrumentations -> works (work_part));
|
||
|
|
joinable!(performances -> ensembles (ensemble));
|
||
|
|
joinable!(performances -> instruments (role));
|
||
|
|
joinable!(performances -> persons (person));
|
||
|
|
joinable!(performances -> recordings (recording));
|
||
|
|
joinable!(recordings -> works (work));
|
||
|
|
joinable!(work_parts -> persons (composer));
|
||
|
|
joinable!(work_parts -> works (work));
|
||
|
|
joinable!(work_sections -> works (work));
|
||
|
|
joinable!(works -> persons (composer));
|
||
|
|
|
||
|
|
allow_tables_to_appear_in_same_query!(
|
||
|
|
ensembles,
|
||
|
|
instrumentations,
|
||
|
|
instruments,
|
||
|
|
part_instrumentations,
|
||
|
|
performances,
|
||
|
|
persons,
|
||
|
|
recordings,
|
||
|
|
work_parts,
|
||
|
|
work_sections,
|
||
|
|
works,
|
||
|
|
);
|