Core - Moved first run code to the static utility class

Core - Improved first run code, this closes #504
Storage - Fixed some migrations on fresh databases
This commit is contained in:
SpoinkyNL committed 2020-11-23 22:11:26 +01:00
1 parent 0c7583d3e4
commit 9e75131948
10 files changed
+124 -50

No files matched your search

@@ -9,6 +9,8 @@ namespace Artemis.Storage.Migrations
public void Apply(LiteRepository repository)
{
// DropCollection will open a transaction so commit the current one
repository.Database.Commit();
if (repository.Database.CollectionExists("ProfileEntity"))
repository.Database.DropCollection("ProfileEntity");
}
@@ -6,9 +6,11 @@ namespace Artemis.Storage.Migrations
public class M3PluginEntitiesIndexChangesMigration : IStorageMigration
{
public int UserVersion => 3;
public void Apply(LiteRepository repository)
{
// DropCollection will open a transaction so commit the current one
repository.Database.Commit();
if (repository.Database.CollectionExists("PluginEntity"))
repository.Database.DropCollection("PluginEntity");
if (repository.Database.CollectionExists("PluginSettingEntity"))