Do not auto-recreate the default groups on startup

This commit is contained in:
Lucas Nicodemus 2015-02-21 17:13:01 -07:00
parent 3104e76d21
commit 484ebd6d81
2 changed files with 29 additions and 25 deletions

View file

@ -52,7 +52,8 @@ namespace TShockAPI.DB
creator = provider;
}
public void EnsureExists(SqlTable table)
// Returns true if the table was created; false if it was not.
public bool EnsureExists(SqlTable table)
{
var columns = GetColumns(table);
if (columns.Count > 0)
@ -66,7 +67,9 @@ namespace TShockAPI.DB
else
{
database.Query(creator.CreateTable(table));
return true;
}
return false;
}
public List<string> GetColumns(SqlTable table)