2021-06-18 22:51:28 +00:00
|
|
|
table! {
|
|
|
|
connections (hostname) {
|
|
|
|
hostname -> Text,
|
|
|
|
connection_uri -> Text,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
table! {
|
|
|
|
instances (id) {
|
|
|
|
id -> Text,
|
|
|
|
name -> Text,
|
|
|
|
ram -> Integer,
|
|
|
|
cores -> Integer,
|
|
|
|
zvol -> Text,
|
|
|
|
zvol_size -> Integer,
|
|
|
|
use_sata -> Nullable<Bool>,
|
|
|
|
owner -> Text,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-18 23:53:42 +00:00
|
|
|
table! {
|
|
|
|
templates (uuid) {
|
|
|
|
uuid -> Text,
|
|
|
|
name -> Text,
|
|
|
|
distro -> Text,
|
|
|
|
version -> Text,
|
|
|
|
download_url -> Text,
|
|
|
|
sha256sum -> Text,
|
|
|
|
local_url -> Text,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-18 22:51:28 +00:00
|
|
|
joinable!(instances -> connections (owner));
|
|
|
|
|
|
|
|
allow_tables_to_appear_in_same_query!(
|
|
|
|
connections,
|
|
|
|
instances,
|
2021-06-18 23:53:42 +00:00
|
|
|
templates,
|
2021-06-18 22:51:28 +00:00
|
|
|
);
|