add linux/unix distribution template table

Signed-off-by: Christine Dodrill <me@christine.website>
This commit is contained in:
Cadey Ratio 2021-06-18 19:53:42 -04:00
parent 57f215606e
commit 5e759d4ed6
3 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1 @@
DROP TABLE templates;

View File

@ -0,0 +1,9 @@
CREATE TABLE IF NOT EXISTS templates
( uuid TEXT UNIQUE NOT NULL PRIMARY KEY
, "name" TEXT UNIQUE NOT NULL
, distro TEXT NOT NULL
, version TEXT NOT NULL
, download_url TEXT NOT NULL
, sha256sum TEXT NOT NULL
, local_url TEXT NOT NULL
);

View File

@ -18,9 +18,22 @@ table! {
}
}
table! {
templates (uuid) {
uuid -> Text,
name -> Text,
distro -> Text,
version -> Text,
download_url -> Text,
sha256sum -> Text,
local_url -> Text,
}
}
joinable!(instances -> connections (owner));
allow_tables_to_appear_in_same_query!(
connections,
instances,
templates,
);