Adds MySql Support

This commit is contained in:
Twitchy 2011-07-12 13:31:36 +12:00
parent 0997b5bd5d
commit 3e17e42a37
11 changed files with 96 additions and 30 deletions

View file

@ -18,8 +18,12 @@ namespace TShockAPI.DB
using (var com = database.CreateCommand())
{
com.CommandText =
"CREATE TABLE IF NOT EXISTS 'ItemBans' ('ItemName' TEXT UNIQUE);";
if (TShock.Config.StorageType.ToLower() == "sqlite")
com.CommandText =
"CREATE TABLE IF NOT EXISTS 'ItemBans' ('ItemName' TEXT UNIQUE);";
else if (TShock.Config.StorageType.ToLower() == "mysql")
com.CommandText =
"CREATE TABLE IF NOT EXISTS ItemBans (ItemName VARCHAR(255) UNIQUE);";
com.ExecuteNonQuery();
}
}