diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-05-09 19:41:33 +0200 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-05-09 19:41:33 +0200 |
commit | a7d56ba0f54273920743109fe1a6541030f3c003 (patch) | |
tree | 879305f9682d6be538dea522b58ceeb07acbfd16 /planetwars-server/src/schema.rs | |
parent | 7b142554d808a494df4ba9e616c58861370ccd93 (diff) | |
download | planetwars.dev-a7d56ba0f54273920743109fe1a6541030f3c003.tar.xz planetwars.dev-a7d56ba0f54273920743109fe1a6541030f3c003.zip |
add ratings table
Diffstat (limited to 'planetwars-server/src/schema.rs')
-rw-r--r-- | planetwars-server/src/schema.rs | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/planetwars-server/src/schema.rs b/planetwars-server/src/schema.rs index ae2e60c..812e05e 100644 --- a/planetwars-server/src/schema.rs +++ b/planetwars-server/src/schema.rs @@ -51,6 +51,16 @@ table! { use diesel::sql_types::*; use crate::db_types::*; + ratings (bot_id) { + bot_id -> Int4, + rating -> Float8, + } +} + +table! { + use diesel::sql_types::*; + use crate::db_types::*; + sessions (id) { id -> Int4, user_id -> Int4, @@ -74,6 +84,15 @@ joinable!(bots -> users (owner_id)); joinable!(code_bundles -> bots (bot_id)); joinable!(match_players -> code_bundles (code_bundle_id)); joinable!(match_players -> matches (match_id)); +joinable!(ratings -> bots (bot_id)); joinable!(sessions -> users (user_id)); -allow_tables_to_appear_in_same_query!(bots, code_bundles, match_players, matches, sessions, users,); +allow_tables_to_appear_in_same_query!( + bots, + code_bundles, + match_players, + matches, + ratings, + sessions, + users, +); |