mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Core - Improved first run code, this closes #504 Storage - Fixed some migrations on fresh databases
18 lines
561 B
C#
18 lines
561 B
C#
using Artemis.Storage.Migrations.Interfaces;
|
|
using LiteDB;
|
|
|
|
namespace Artemis.Storage.Migrations
|
|
{
|
|
public class M1AttributeBasedPropertiesMigration : IStorageMigration
|
|
{
|
|
public int UserVersion => 1;
|
|
|
|
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");
|
|
}
|
|
}
|
|
} |