diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-07-18 21:03:34 +0200 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-07-18 21:03:34 +0200 |
commit | 7daf8f643798ce76733006f8469890bf1a3fd05e (patch) | |
tree | d755c4f0979f56792684b109d263624aef4baaad /planetwars-server/src/schema.rs | |
parent | 608d05bc167c57d190d3c06f250b5e4a5662e77e (diff) | |
parent | d092f5d89c0fda5cc67349d5489b4ef1b294e053 (diff) | |
download | planetwars.dev-7daf8f643798ce76733006f8469890bf1a3fd05e.tar.xz planetwars.dev-7daf8f643798ce76733006f8469890bf1a3fd05e.zip |
Merge branch 'next'
Diffstat (limited to 'planetwars-server/src/schema.rs')
-rw-r--r-- | planetwars-server/src/schema.rs | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/planetwars-server/src/schema.rs b/planetwars-server/src/schema.rs index be3e858..0606ac4 100644 --- a/planetwars-server/src/schema.rs +++ b/planetwars-server/src/schema.rs @@ -5,10 +5,12 @@ table! { use diesel::sql_types::*; use crate::db_types::*; - bots (id) { + bot_versions (id) { id -> Int4, - owner_id -> Nullable<Int4>, - name -> Text, + bot_id -> Nullable<Int4>, + code_bundle_path -> Nullable<Text>, + created_at -> Timestamp, + container_digest -> Nullable<Text>, } } @@ -16,11 +18,10 @@ table! { use diesel::sql_types::*; use crate::db_types::*; - code_bundles (id) { + bots (id) { id -> Int4, - bot_id -> Nullable<Int4>, - path -> Text, - created_at -> Timestamp, + owner_id -> Nullable<Int4>, + name -> Text, } } @@ -31,7 +32,7 @@ table! { match_players (match_id, player_id) { match_id -> Int4, player_id -> Int4, - code_bundle_id -> Int4, + bot_version_id -> Nullable<Int4>, } } @@ -81,16 +82,16 @@ table! { } } +joinable!(bot_versions -> bots (bot_id)); joinable!(bots -> users (owner_id)); -joinable!(code_bundles -> bots (bot_id)); -joinable!(match_players -> code_bundles (code_bundle_id)); +joinable!(match_players -> bot_versions (bot_version_id)); joinable!(match_players -> matches (match_id)); joinable!(ratings -> bots (bot_id)); joinable!(sessions -> users (user_id)); allow_tables_to_appear_in_same_query!( + bot_versions, bots, - code_bundles, match_players, matches, ratings, |