aboutsummaryrefslogtreecommitdiff
path: root/planetwars-server/src/schema.rs
diff options
context:
space:
mode:
authorIlion Beyst <ilion.beyst@gmail.com>2022-05-28 11:22:44 +0200
committerIlion Beyst <ilion.beyst@gmail.com>2022-05-28 11:22:44 +0200
commit80c60ac69c9b0d86a4536eeac82cf266eb4430bc (patch)
treebc2ac0c803be27395c0297123f0794e1b8904676 /planetwars-server/src/schema.rs
parent643c0e7706ab927ef270e4a5b62ada0c38b651b9 (diff)
parentfadcda850332f8adb0a4382da9f04f78db3f6d1a (diff)
downloadplanetwars.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.rs21
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,
+);