Remove TEST_FLAG and related behavior
This commit is contained in:
parent
3fe40cf70f
commit
48dacf3ddd
1 changed files with 1 additions and 26 deletions
|
|
@ -44,7 +44,6 @@ namespace MatterHackers.MatterControl.DataStorage
|
|||
private string datastoreLocation = ApplicationDataStorage.Instance.DatastorePath;
|
||||
private static Datastore globalInstance;
|
||||
private ApplicationSession activeSession;
|
||||
private bool TEST_FLAG = false;
|
||||
|
||||
private List<Type> dataStoreTables = new List<Type>
|
||||
{
|
||||
|
|
@ -90,22 +89,6 @@ namespace MatterHackers.MatterControl.DataStorage
|
|||
default:
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
if (TEST_FLAG)
|
||||
{
|
||||
//In test mode - attempt to drop all tables (in case db was locked when we tried to delete it)
|
||||
foreach (Type table in dataStoreTables)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.dbSQLite.DropTable(table);
|
||||
}
|
||||
catch
|
||||
{
|
||||
GuiWidget.BreakInDebugger();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static Datastore Instance
|
||||
|
|
@ -165,15 +148,7 @@ namespace MatterHackers.MatterControl.DataStorage
|
|||
//Run initial checks and operations on sqlite datastore
|
||||
public void Initialize()
|
||||
{
|
||||
if (TEST_FLAG)
|
||||
{
|
||||
ValidateSchema();
|
||||
GenerateSampleData();
|
||||
}
|
||||
else
|
||||
{
|
||||
ValidateSchema();
|
||||
}
|
||||
ValidateSchema();
|
||||
|
||||
// Contruct the root library collection if missing
|
||||
var rootLibraryCollection = Datastore.Instance.dbSQLite.Table<PrintItemCollection>().Where(v => v.Name == "_library").Take(1).FirstOrDefault();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue