From 6ef6a872fe3bbe389e92145b39fd88d864f6a790 Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Sat, 26 Feb 2022 23:07:13 +0100 Subject: make bot owner nullable --- planetwars-server/src/db/bots.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'planetwars-server/src/db/bots.rs') diff --git a/planetwars-server/src/db/bots.rs b/planetwars-server/src/db/bots.rs index 970dcf9..f7d8373 100644 --- a/planetwars-server/src/db/bots.rs +++ b/planetwars-server/src/db/bots.rs @@ -7,14 +7,14 @@ use chrono; #[derive(Insertable)] #[table_name = "bots"] pub struct NewBot<'a> { - pub owner_id: i32, + pub owner_id: Option, pub name: &'a str, } #[derive(Queryable, Debug, PartialEq, Serialize, Deserialize)] pub struct Bot { pub id: i32, - pub owner_id: i32, + pub owner_id: Option, pub name: String, } -- cgit v1.2.3