Adds MySql Support
This commit is contained in:
parent
0997b5bd5d
commit
3e17e42a37
11 changed files with 96 additions and 30 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue