This commit is contained in:
Nicolas Constant 2021-01-23 00:26:23 -05:00
parent cdb8aa48e1
commit 8a147b0277
No known key found for this signature in database
GPG key ID: 1E9F677FB01A5688

View file

@ -29,11 +29,11 @@ namespace BirdsiteLive.DAL
if (currentVersion == mandatoryVersion) return;
// Init Db
var migrationPatterns = _dbInitializerDal.GetMigrationPatterns();
if (currentVersion == null)
currentVersion = await _dbInitializerDal.InitDbAsync();
// Migrate Db
var migrationPatterns = _dbInitializerDal.GetMigrationPatterns();
while (migrationPatterns.Any(x => x.Item1 == currentVersion))
{
var migration = migrationPatterns.First(x => x.Item1 == currentVersion);