Merge pull request #2269 from Pryaxis/h/fix-typo

Fix (partial) ban system conversion issue with MySQL
This commit is contained in:
Lucas Nicodemus 2021-04-11 22:06:37 -07:00 committed by GitHub
commit 070787ed96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View file

@ -15,6 +15,9 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
## Upcoming changes
* This could be you!
## TShock 4.5.0.1
* Fixed typo in conversion from old to new ban system for MySQL hosted ban databases. (@DeathCradle)
## TShock 4.5.0
* Updated OTAPI and TSAPI to Terraria 1.4.2.1. (@Stealownz, @DeathCradle)
* Updated TShock with preliminary protocol support for Terraria 1.4.2.1. (@Stealownz)

View file

@ -107,7 +107,7 @@ namespace TShockAPI.DB
int res;
if (database.GetSqlType() == SqlType.Mysql)
{
res = database.QueryScalar<int>("SELECT COUNT(name) FROM information_schema.tables WHERE table_schema = @0 and table_name = 'Bans'", TShock.Config.Settings.MySqlDbName);
res = database.QueryScalar<int>("SELECT COUNT(table_name) FROM information_schema.tables WHERE table_schema = @0 and table_name = 'Bans'", TShock.Config.Settings.MySqlDbName);
}
else
{

View file

@ -53,5 +53,5 @@ using System.Runtime.InteropServices;
// Also, be sure to release on github with the exact assembly version tag as below
// so that the update manager works correctly (via the Github releases api and mimic)
[assembly: AssemblyVersion("4.5.0")]
[assembly: AssemblyFileVersion("4.5.0")]
[assembly: AssemblyVersion("4.5.0.1")]
[assembly: AssemblyFileVersion("4.5.0.1")]