Skip to content

The getPendingMigrations creates migrations table #10858

Closed

Description

@pkuczynski

Issue description

The getPendingMigrations creates migrations table

Expected Behavior

When I call getPendingMigrations I expect it would check if migrations table exists and compare it's content with my migrations folder to tell me, which migrations are not executed yet. If the table does not exist, it should return all of the migrations as pending.

Actual Behavior

getPendingMigrations does create the migrations table instead of checking if it exists before reading it.

Steps to reproduce

Run getPendingMigrations on the empty database:

const migrationExecutor = new MigrationExecutor(dataSource);
await migrationExecutor.getPendingMigrations();

My Environment

Dependency Version
Operating System
Node.js version 20
Typescript version 5.3.3
TypeORM version 0.3.19

Additional Context

No response

Relevant Database Driver(s)

  • aurora-mysql
  • aurora-postgres
  • better-sqlite3
  • cockroachdb
  • cordova
  • expo
  • mongodb
  • mysql
  • nativescript
  • oracle
  • postgres
  • react-native
  • sap
  • spanner
  • sqlite
  • sqlite-abstract
  • sqljs
  • sqlserver

Are you willing to resolve this issue by submitting a Pull Request?

Yes, I have the time, and I know how to start.

Activity

  1. github-actions commented on Sep 18, 2025

    @github-actions

    TypeORM has returned to active development after recently transitioning to new leadership (see related announcement).

    As part of the new team's efforts to prioritise work on the project moving forward, it is necessary to clean up the backlog of stale issues.

    🧹 This issue is being automatically closed because it has had no activity in the last 6 months.
    If you believe this issue is still relevant, feel free to comment below and the maintainers may reopen it. Thank you for your contribution.

  2. pkuczynski commented on Sep 18, 2025

    @pkuczynski
    MemberAuthor

    Yes, this issue is still relevant. It was stale since nobody from the team commented on it. If you confirm, I could come up with PR.

  3. pkuczynski commented on Sep 18, 2025

    @pkuczynski
    MemberAuthor

    @gioboa should I open a new issue or this one will be reviewed again?

  4. reopened this on Sep 18, 2025
  5. gioboa commented on Sep 18, 2025

    @gioboa
    Collaborator

    Yes, this issue is still relevant. It was stale since nobody from the team commented on it. If you confirm, I could come up with PR.

    Thanks for the feedback. Feel free to drop a PR for this, appreciated. 🙏

  6. pkuczynski commented on Sep 21, 2025

    @pkuczynski
    MemberAuthor

    Here you go @gioboa #11672. On this occasion I also created #11673, which I am happy to work on a fix.

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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions