add schema.patch to allow unused imports in schema file

This commit is contained in:
Ilion Beyst 2022-01-03 23:44:01 +01:00
parent 5b10d5e98e
commit 32131da678
3 changed files with 13 additions and 8 deletions

View file

@ -4,3 +4,4 @@
[print_schema] [print_schema]
file = "src/schema.rs" file = "src/schema.rs"
import_types = ["diesel::sql_types::*", "crate::db_types::*"] import_types = ["diesel::sql_types::*", "crate::db_types::*"]
patch_file = "src/schema.patch"

View file

@ -0,0 +1,8 @@
diff --git a/planetwars-server/src/schema.rs b/planetwars-server/src/schema.rs
index 7f60d64..f88f687 100644
--- a/planetwars-server/src/schema.rs
+++ b/planetwars-server/src/schema.rs
@@ -0,0 +1,3 @@
+// This file is autogenerated by diesel
+#![allow(unused_imports)]
+

View file

@ -1,3 +1,6 @@
// This file is autogenerated by diesel
#![allow(unused_imports)]
table! { table! {
use diesel::sql_types::*; use diesel::sql_types::*;
use crate::db_types::*; use crate::db_types::*;
@ -73,11 +76,4 @@ joinable!(match_players -> bots (bot_id));
joinable!(match_players -> matches (match_id)); joinable!(match_players -> matches (match_id));
joinable!(sessions -> users (user_id)); joinable!(sessions -> users (user_id));
allow_tables_to_appear_in_same_query!( allow_tables_to_appear_in_same_query!(bots, code_bundles, match_players, matches, sessions, users,);
bots,
code_bundles,
match_players,
matches,
sessions,
users,
);