Allow reconfiguring guild

This commit is contained in:
bluepython508
2024-11-09 17:34:21 +00:00
parent b19c49baef
commit 49538af0ad

View File

@@ -51,7 +51,7 @@ impl Data {
self.0
.lock()
.await
.prepare_cached("INSERT INTO guilds (guild, town_square, cottages) VALUES (?, ?, ?)")?
.prepare_cached("INSERT INTO guilds (guild, town_square, cottages) VALUES (?, ?, ?) ON CONFLICT(guild) DO UPDATE SET town_square = excluded.town_square, cottages = excluded.cottages")?
.execute(rusqlite::params![
guild.to_string(),
town_square.to_string(),