/// <summary>
 ///   Creates a new instance of the <see cref="MigrationManager"/> class
 ///   for the specifed <see cref="IpfsEngine"/>.
 /// </summary>
 public MigrationManager(IpfsEngine ipfs)
 {
     this.ipfs  = ipfs;
     Migrations = typeof(MigrationManager).Assembly
                  .GetTypes()
                  .Where(x => typeof(IMigration).IsAssignableFrom(x) && !x.IsInterface && !x.IsAbstract)
                  .Select(x => (IMigration)Activator.CreateInstance(x))
                  .OrderBy(x => x.Version)
                  .ToList();
     log.Debug("Checking and assigning default Migration1 to avoid exceptions if none other migrations found");
     Migrations = Migrations.DefaultIfEmpty(new MigrateTo1()).ToList();
 }