Database optimizations
All checks were successful
Build and push container image / build (push) Successful in 10m37s

This commit is contained in:
toast 2024-02-06 13:02:17 +11:00
parent b7f5f12cb3
commit 5811d5df6a
4 changed files with 7 additions and 6 deletions

2
Cargo.lock generated
View File

@ -822,7 +822,7 @@ dependencies = [
[[package]]
name = "kon"
version = "0.1.14"
version = "0.1.15"
dependencies = [
"cargo_toml",
"gamedig",

View File

@ -1,6 +1,6 @@
[package]
name = "kon"
version = "0.1.14"
version = "0.1.15"
rust-version = "1.74"
edition = "2021"

View File

@ -94,7 +94,7 @@ pub async fn add(
msg.edit(
ctx,
serenity_prelude::EditMessage::new()
.content(format!("*Error adding server to database: {:?}*", y))
.content(format!("*Error adding server to database:\n`{}`*", y))
.embeds(Vec::new())
.components(Vec::new())
).await?;
@ -166,7 +166,7 @@ pub async fn remove(
msg.edit(
ctx,
serenity_prelude::EditMessage::new()
.content(format!("*Error removing server from database: {:?}*", y))
.content(format!("*Error removing server from database:\n`{}`*", y))
.embeds(Vec::new())
.components(Vec::new())
).await?;

View File

@ -23,10 +23,11 @@ impl DatabaseController {
// Gameservers
client.batch_execute("
CREATE TABLE IF NOT EXISTS gameservers (
server_name VARCHAR(255) NOT NULL PRIMARY KEY,
server_name VARCHAR(255) NOT NULL,
game_name VARCHAR(255) NOT NULL,
guild_owner BIGINT NOT NULL,
ip_address VARCHAR(255) NOT NULL
ip_address VARCHAR(255) NOT NULL,
PRIMARY KEY (server_name, guild_owner)
);
").await?;