Skip to content

Commit

Permalink
Escape Rank column name
Browse files Browse the repository at this point in the history
  • Loading branch information
MSWS committed Sep 9, 2024
1 parent c79ced7 commit 918a311
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/GangsImpl/AbstractDB/AbstractDBRankManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Dictionary<int, IEnumerable<IGangRank>>> GetAllRanks() {
Expand Down

0 comments on commit 918a311

Please sign in to comment.