From 918a31132f40a55b4b84d24a4a25240c14ee86b8 Mon Sep 17 00:00:00 2001 From: MSWS Date: Mon, 9 Sep 2024 16:40:42 -0700 Subject: [PATCH] Escape Rank column name --- src/GangsImpl/AbstractDB/AbstractDBRankManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GangsImpl/AbstractDB/AbstractDBRankManager.cs b/src/GangsImpl/AbstractDB/AbstractDBRankManager.cs index a0aa2a5..278dd16 100644 --- a/src/GangsImpl/AbstractDB/AbstractDBRankManager.cs +++ b/src/GangsImpl/AbstractDB/AbstractDBRankManager.cs @@ -46,8 +46,8 @@ public void Dispose() { virtual protected string CreateTableQuery(string tableName, bool inTesting) { return inTesting ? - $"CREATE TEMPORARY TABLE IF NOT EXISTS {tableName} (GangId INT NOT NULL, Rank INT NOT NULL, Name VARCHAR(255) NOT NULL, Permissions INT NOT NULL, PRIMARY KEY (GangId, Rank))" : - $"CREATE TABLE IF NOT EXISTS {tableName} (GangId INT NOT NULL, Rank INT NOT NULL, Name VARCHAR(255) NOT NULL, Permissions INT NOT NULL, PRIMARY KEY (GangId, Rank))"; + $"CREATE TEMPORARY TABLE IF NOT EXISTS {tableName} (GangId INT NOT NULL, `Rank` INT NOT NULL, Name VARCHAR(255) NOT NULL, Permissions INT NOT NULL, PRIMARY KEY (GangId, Rank))" : + $"CREATE TABLE IF NOT EXISTS {tableName} (GangId INT NOT NULL, `Rank` INT NOT NULL, Name VARCHAR(255) NOT NULL, Permissions INT NOT NULL, PRIMARY KEY (GangId, Rank))"; } public async Task>> GetAllRanks() {