Browse Source

add linux/unix distribution template table

Signed-off-by: Christine Dodrill <[email protected]>
main
Cadey Ratio 3 months ago
parent
commit
5e759d4ed6
  1. 1
      migrations/2021-06-18-234254_templates/down.sql
  2. 9
      migrations/2021-06-18-234254_templates/up.sql
  3. 13
      src/schema.rs

1
migrations/2021-06-18-234254_templates/down.sql

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

9
migrations/2021-06-18-234254_templates/up.sql

@ -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
);

13
src/schema.rs

@ -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,
);

Loading…
Cancel
Save