/// <summary> /// Populates the journal with the migrations that have already been deployed /// to the target database before dotMigrator was in use. /// </summary> /// <param name="baselineMigrationName"></param> public void EnsureBaseline(string baselineMigrationName) { EnsureJournal(); LoadDeployedMigrations(); if (_deployedMigrations.Count == 0) { var baselineMigrations = GetAvailableMigrations() .TakeUntil(m => m.Name.Equals(baselineMigrationName, StringComparison.OrdinalIgnoreCase)); _deployedMigrations = _journal.SetBaseline(baselineMigrations); } /* otherwise, the subset of available migrations up to the baselineMigrationName must * match the first deployed migrations.. but that will be checked when calling Plan() */ }