Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The getPendingMigrations creates migrations table #10858

Open
1 of 18 tasks
pkuczynski opened this issue Apr 29, 2024 · 0 comments
Open
1 of 18 tasks

The getPendingMigrations creates migrations table #10858

pkuczynski opened this issue Apr 29, 2024 · 0 comments

Comments

@pkuczynski
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant