aboutsummaryrefslogtreecommitdiff
path: root/planetwars-server/src/schema.rs
diff options
context:
space:
mode:
authorIlion Beyst <ilion.beyst@gmail.com>2022-08-23 20:00:21 +0200
committerIlion Beyst <ilion.beyst@gmail.com>2022-08-23 20:00:21 +0200
commitaa066ef5bb9ed043feafd0e87e219cb34cce35c5 (patch)
tree9773cfd035a712e951ad9490e95c05f723aa22b1 /planetwars-server/src/schema.rs
parentfa4c684475a365055c2aacdf712c7903c9a5f2f2 (diff)
downloadplanetwars.dev-aa066ef5bb9ed043feafd0e87e219cb34cce35c5.tar.xz
planetwars.dev-aa066ef5bb9ed043feafd0e87e219cb34cce35c5.zip
create maps table
Diffstat (limited to 'planetwars-server/src/schema.rs')
-rw-r--r--planetwars-server/src/schema.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/planetwars-server/src/schema.rs b/planetwars-server/src/schema.rs
index 70889b1..adc6555 100644
--- a/planetwars-server/src/schema.rs
+++ b/planetwars-server/src/schema.rs
@@ -30,6 +30,17 @@ table! {
use diesel::sql_types::*;
use crate::db_types::*;
+ maps (id) {
+ id -> Int4,
+ name -> Text,
+ file_path -> Text,
+ }
+}
+
+table! {
+ use diesel::sql_types::*;
+ use crate::db_types::*;
+
match_players (match_id, player_id) {
match_id -> Int4,
player_id -> Int4,
@@ -48,6 +59,7 @@ table! {
created_at -> Timestamp,
winner -> Nullable<Int4>,
is_public -> Bool,
+ map_id -> Nullable<Int4>,
}
}
@@ -87,12 +99,14 @@ table! {
joinable!(bots -> users (owner_id));
joinable!(match_players -> bot_versions (bot_version_id));
joinable!(match_players -> matches (match_id));
+joinable!(matches -> maps (map_id));
joinable!(ratings -> bots (bot_id));
joinable!(sessions -> users (user_id));
allow_tables_to_appear_in_same_query!(
bot_versions,
bots,
+ maps,
match_players,
matches,
ratings,