aboutsummaryrefslogtreecommitdiff
path: root/planetwars-server/src/schema.rs
diff options
context:
space:
mode:
authorIlion Beyst <ilion.beyst@gmail.com>2022-10-12 22:52:15 +0200
committerIlion Beyst <ilion.beyst@gmail.com>2022-10-12 22:52:15 +0200
commitae57359353cf31ff374a8932999742920878bf00 (patch)
tree0db27d394a2a61a5cc94e73014c82954829c1338 /planetwars-server/src/schema.rs
parented016773b112460ebbf0ff023b0915545229ed41 (diff)
downloadplanetwars.dev-ae57359353cf31ff374a8932999742920878bf00.tar.xz
planetwars.dev-ae57359353cf31ff374a8932999742920878bf00.zip
upgrade to diesel 2.0
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,