diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-05-28 11:22:44 +0200 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-05-28 11:22:44 +0200 |
commit | 80c60ac69c9b0d86a4536eeac82cf266eb4430bc (patch) | |
tree | bc2ac0c803be27395c0297123f0794e1b8904676 /planetwars-server/src/schema.rs | |
parent | 643c0e7706ab927ef270e4a5b62ada0c38b651b9 (diff) | |
parent | fadcda850332f8adb0a4382da9f04f78db3f6d1a (diff) | |
download | planetwars.dev-80c60ac69c9b0d86a4536eeac82cf266eb4430bc.tar.xz planetwars.dev-80c60ac69c9b0d86a4536eeac82cf266eb4430bc.zip |
Merge branch 'feature/leaderboard'
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, +); |