aboutsummaryrefslogtreecommitdiff
path: root/planetwars-server/src/db
diff options
context:
space:
mode:
authorIlion Beyst <ilion.beyst@gmail.com>2022-02-26 23:07:13 +0100
committerIlion Beyst <ilion.beyst@gmail.com>2022-02-27 14:51:32 +0100
commit6ef6a872fe3bbe389e92145b39fd88d864f6a790 (patch)
tree6db40ec6f0cb91b9262aabaa3c4134a680a8803c /planetwars-server/src/db
parent29bd21e489cdda2aaf807c66198f112f8ac0f7d5 (diff)
downloadplanetwars.dev-6ef6a872fe3bbe389e92145b39fd88d864f6a790.tar.xz
planetwars.dev-6ef6a872fe3bbe389e92145b39fd88d864f6a790.zip
make bot owner nullable
Diffstat (limited to 'planetwars-server/src/db')
-rw-r--r--planetwars-server/src/db/bots.rs4
1 files changed, 2 insertions, 2 deletions
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<i32>,
pub name: &'a str,
}
#[derive(Queryable, Debug, PartialEq, Serialize, Deserialize)]
pub struct Bot {
pub id: i32,
- pub owner_id: i32,
+ pub owner_id: Option<i32>,
pub name: String,
}