aboutsummaryrefslogtreecommitdiff
path: root/planetwars-server/src/schema.rs
diff options
context:
space:
mode:
Diffstat (limited to 'planetwars-server/src/schema.rs')
-rw-r--r--planetwars-server/src/schema.rs41
1 files changed, 25 insertions, 16 deletions
diff --git a/planetwars-server/src/schema.rs b/planetwars-server/src/schema.rs
index adc6555..27ebebe 100644
--- a/planetwars-server/src/schema.rs
+++ b/planetwars-server/src/schema.rs
@@ -1,7 +1,15 @@
// This file is autogenerated by diesel
#![allow(unused_imports)]
-table! {
+// @generated automatically by Diesel CLI.
+
+pub mod sql_types {
+ #[derive(diesel::sql_types::SqlType)]
+ #[diesel(postgres_type(name = "match_state"))]
+ pub struct MatchState;
+}
+
+diesel::table! {
use diesel::sql_types::*;
use crate::db_types::*;
@@ -14,7 +22,7 @@ table! {
}
}
-table! {
+diesel::table! {
use diesel::sql_types::*;
use crate::db_types::*;
@@ -26,7 +34,7 @@ table! {
}
}
-table! {
+diesel::table! {
use diesel::sql_types::*;
use crate::db_types::*;
@@ -37,7 +45,7 @@ table! {
}
}
-table! {
+diesel::table! {
use diesel::sql_types::*;
use crate::db_types::*;
@@ -48,13 +56,14 @@ table! {
}
}
-table! {
+diesel::table! {
use diesel::sql_types::*;
use crate::db_types::*;
+ use super::sql_types::MatchState;
matches (id) {
id -> Int4,
- state -> Match_state,
+ state -> MatchState,
log_path -> Text,
created_at -> Timestamp,
winner -> Nullable<Int4>,
@@ -63,7 +72,7 @@ table! {
}
}
-table! {
+diesel::table! {
use diesel::sql_types::*;
use crate::db_types::*;
@@ -73,7 +82,7 @@ table! {
}
}
-table! {
+diesel::table! {
use diesel::sql_types::*;
use crate::db_types::*;
@@ -84,7 +93,7 @@ table! {
}
}
-table! {
+diesel::table! {
use diesel::sql_types::*;
use crate::db_types::*;
@@ -96,14 +105,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));
+diesel::joinable!(bots -> users (owner_id));
+diesel::joinable!(match_players -> bot_versions (bot_version_id));
+diesel::joinable!(match_players -> matches (match_id));
+diesel::joinable!(matches -> maps (map_id));
+diesel::joinable!(ratings -> bots (bot_id));
+diesel::joinable!(sessions -> users (user_id));
-allow_tables_to_appear_in_same_query!(
+diesel::allow_tables_to_appear_in_same_query!(
bot_versions,
bots,
maps,