diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-01-03 23:44:01 +0100 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-01-03 23:44:01 +0100 |
commit | 32131da67894b8bed5cf313b63a115b58ff23761 (patch) | |
tree | 29bdda8cb393d24a55a260e57d1ecd0cb9864150 | |
parent | 5b10d5e98e806ce867d27c4cc7b7f5651656744f (diff) | |
download | planetwars.dev-32131da67894b8bed5cf313b63a115b58ff23761.tar.xz planetwars.dev-32131da67894b8bed5cf313b63a115b58ff23761.zip |
add schema.patch to allow unused imports in schema file
-rw-r--r-- | planetwars-server/diesel.toml | 1 | ||||
-rw-r--r-- | planetwars-server/src/schema.patch | 8 | ||||
-rw-r--r-- | planetwars-server/src/schema.rs | 12 |
3 files changed, 13 insertions, 8 deletions
diff --git a/planetwars-server/diesel.toml b/planetwars-server/diesel.toml index d95631b..75de8bd 100644 --- a/planetwars-server/diesel.toml +++ b/planetwars-server/diesel.toml @@ -4,3 +4,4 @@ [print_schema] file = "src/schema.rs" import_types = ["diesel::sql_types::*", "crate::db_types::*"] +patch_file = "src/schema.patch"
\ No newline at end of file diff --git a/planetwars-server/src/schema.patch b/planetwars-server/src/schema.patch new file mode 100644 index 0000000..e062232 --- /dev/null +++ b/planetwars-server/src/schema.patch @@ -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)] ++ diff --git a/planetwars-server/src/schema.rs b/planetwars-server/src/schema.rs index 7f60d64..5e74e85 100644 --- a/planetwars-server/src/schema.rs +++ b/planetwars-server/src/schema.rs @@ -1,3 +1,6 @@ +// This file is autogenerated by diesel +#![allow(unused_imports)] + table! { use diesel::sql_types::*; use crate::db_types::*; @@ -73,11 +76,4 @@ joinable!(match_players -> bots (bot_id)); joinable!(match_players -> matches (match_id)); joinable!(sessions -> users (user_id)); -allow_tables_to_appear_in_same_query!( - bots, - code_bundles, - match_players, - matches, - sessions, - users, -); +allow_tables_to_appear_in_same_query!(bots, code_bundles, match_players, matches, sessions, users,); |