diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-08-23 20:00:21 +0200 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-08-23 20:00:21 +0200 |
commit | aa066ef5bb9ed043feafd0e87e219cb34cce35c5 (patch) | |
tree | 9773cfd035a712e951ad9490e95c05f723aa22b1 /planetwars-server/src/db/matches.rs | |
parent | fa4c684475a365055c2aacdf712c7903c9a5f2f2 (diff) | |
download | planetwars.dev-aa066ef5bb9ed043feafd0e87e219cb34cce35c5.tar.xz planetwars.dev-aa066ef5bb9ed043feafd0e87e219cb34cce35c5.zip |
create maps table
Diffstat (limited to 'planetwars-server/src/db/matches.rs')
-rw-r--r-- | planetwars-server/src/db/matches.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/planetwars-server/src/db/matches.rs b/planetwars-server/src/db/matches.rs index 9f096df..77d39ef 100644 --- a/planetwars-server/src/db/matches.rs +++ b/planetwars-server/src/db/matches.rs @@ -41,6 +41,7 @@ pub struct MatchBase { pub created_at: NaiveDateTime, pub winner: Option<i32>, pub is_public: bool, + pub map_id: Option<i32>, } #[derive(Queryable, Identifiable, Associations, Clone)] @@ -166,14 +167,7 @@ pub fn list_bot_matches( bot_versions::table.on(match_players::bot_version_id.eq(bot_versions::id.nullable())), ) .filter(bot_versions::bot_id.eq(bot_id)) - .select(( - matches::id, - matches::state, - matches::log_path, - matches::created_at, - matches::winner, - matches::is_public, - )) + .select(matches::all_columns) .into_boxed(); let matches = |