Simplify DB backup for SQLite

This commit is contained in:
UnknownShadow200 2017-09-22 21:32:05 +10:00
parent 33d9ca82a0
commit a6d32942e2
2 changed files with 3 additions and 4 deletions

View File

@ -89,7 +89,7 @@ namespace MCGalaxy {
if (p == null) return true;
LevelAccessController visit, build;
Level lvl = null;
LevelConfig cfg = GetConfig(map, out lvl);
LevelConfig cfg = GetConfig(map, out lvl);
if (lvl != null) {
visit = lvl.VisitAccess;

View File

@ -88,9 +88,8 @@ namespace MCGalaxy {
}
sql.WriteLine(");");
} else {
using (DataTable tableSQL = Database.Fill("SELECT sql FROM sqlite_master WHERE tbl_name LIKE @0" +
" AND type = 'table' AND name NOT LIKE 'sqlite_%'" +
" ORDER BY substr(type,2,1), name", tableName))
const string syntax = "SELECT sql FROM sqlite_master WHERE tbl_name = @0 AND type = 'table'";
using (DataTable tableSQL = Database.Fill(syntax + Database.Backend.CaselessWhereSuffix, tableName))
{
//just print out the data in the table.
foreach (DataRow row in tableSQL.Rows) {