/// <summary>
/// Gets all the migrations that are defined in the configured migrations assembly.
/// </summary>
public static IEnumerable<string> GetMigrations([NotNull] this DatabaseFacade databaseFacade)
GetPendingMigrations
获取待迁移列表
/// <summary>
/// Gets all migrations that are defined in the assembly but haven't been applied to the target database.
/// </summary>
public static IEnumerable<string> GetPendingMigrations([NotNull] this DatabaseFacade databaseFacade)
GetAppliedMigrations
获取执行了迁移的列表
/// <summary>
/// Gets all migrations that have been applied to the target database.
/// </summary>
public static IEnumerable<string> GetAppliedMigrations([NotNull] this DatabaseFacade databaseFacade)
Migrate
执行迁移
/// <summary>
/// <para>
/// Applies any pending migrations for the context to the database. Will create the database
/// if it does not already exist.
/// </para>
/// <para>
/// Note that this API is mutually exclusive with DbContext.Database.EnsureCreated(). EnsureCreated does not use migrations
/// to create the database and therefore the database that is created cannot be later updated using migrations.
/// </para>
/// </summary>
/// <param name="databaseFacade"> The <see cref="T:Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade" /> for the context. </param>
public static void Migrate([NotNull] this DatabaseFacade databaseFacade)