Skip to content

Document how to get list of pending migrations #1342

Closed

Description

@sandersaares

As part of my deployment processes, I want to validate that the database has been migrated before I start the app. To do this, I need to know if there are some migrations that have not been applied.

In EF6, I see there is DbMigrator.GetPendingMigrations() but is there an equivalent for EF Core? I request it be documented how one can inspect the sets of migrations that are available versus applied.

Activity

  1. bricelam commented on Mar 7, 2019

    @bricelam
    Contributor

    DbContext.Database.GetPendingMigrations()

  2. transferred this issue fromdotnet/efcoreon Mar 7, 2019
  3. dazinator commented on Jul 17, 2019

    @dazinator

    Very useful to have this somewhere in the docs - perhaps here? #814

  4. added this to the Backlog milestone on Sep 1, 2019
  5. self-assigned this
    on Sep 9, 2020
  6. removed their assignment
    on Jul 8, 2023
  7. added a commit that references this issue on Aug 11, 2026
    bb42937
  8. modified the milestones: Backlog, 11.0.0 on Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions