musicus/database/src/schema.rs

120 lines
2.1 KiB
Rust
Raw Normal View History

table! {
ensembles (id) {
2020-11-28 21:45:22 +01:00
id -> Text,
name -> Text,
}
}
table! {
instrumentations (id) {
id -> BigInt,
2020-11-28 21:45:22 +01:00
work -> Text,
instrument -> Text,
}
}
table! {
instruments (id) {
2020-11-28 21:45:22 +01:00
id -> Text,
name -> Text,
}
}
2020-12-20 11:47:27 +01:00
table! {
mediums (id) {
id -> Text,
name -> Text,
discid -> Nullable<Text>,
}
}
table! {
performances (id) {
id -> BigInt,
2020-11-28 21:45:22 +01:00
recording -> Text,
person -> Nullable<Text>,
ensemble -> Nullable<Text>,
role -> Nullable<Text>,
}
}
table! {
persons (id) {
2020-11-28 21:45:22 +01:00
id -> Text,
first_name -> Text,
last_name -> Text,
}
}
table! {
recordings (id) {
2020-11-28 21:45:22 +01:00
id -> Text,
work -> Text,
comment -> Text,
}
}
2020-11-01 11:04:31 +01:00
table! {
2021-04-08 00:08:31 +02:00
tracks (id) {
2020-12-20 11:47:27 +01:00
id -> Text,
medium -> Text,
index -> Integer,
2020-11-28 21:45:22 +01:00
recording -> Text,
2020-11-01 11:04:31 +01:00
work_parts -> Text,
2021-01-15 22:27:43 +01:00
path -> Text,
2020-11-01 11:04:31 +01:00
}
}
table! {
work_parts (id) {
id -> BigInt,
2020-11-28 21:45:22 +01:00
work -> Text,
part_index -> BigInt,
title -> Text,
}
}
table! {
work_sections (id) {
id -> BigInt,
2020-11-28 21:45:22 +01:00
work -> Text,
title -> Text,
before_index -> BigInt,
}
}
table! {
works (id) {
2020-11-28 21:45:22 +01:00
id -> Text,
composer -> Text,
title -> Text,
}
}
joinable!(instrumentations -> instruments (instrument));
joinable!(instrumentations -> works (work));
joinable!(performances -> ensembles (ensemble));
joinable!(performances -> instruments (role));
joinable!(performances -> persons (person));
joinable!(performances -> recordings (recording));
joinable!(recordings -> works (work));
2021-04-08 00:08:31 +02:00
joinable!(tracks -> mediums (medium));
joinable!(tracks -> recordings (recording));
joinable!(work_parts -> works (work));
joinable!(work_sections -> works (work));
joinable!(works -> persons (composer));
allow_tables_to_appear_in_same_query!(
ensembles,
instrumentations,
instruments,
2020-12-20 11:47:27 +01:00
mediums,
performances,
persons,
recordings,
2020-11-01 11:04:31 +01:00
tracks,
work_parts,
work_sections,
works,
);