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

fix(migrations): respect custom migration name in migration class names #4294

Merged
merged 2 commits into from
May 1, 2023

Conversation

srmagura
Copy link
Contributor

Fixes:

  • Custom migration name was not used in the migration class name for SQL drivers.
  • Custom migration name was not used in the migration file name or class name for the Mongo driver.

Side note

I am having some trouble running the Mongo tests on Ubuntu 22.04. Getting an error because libcrypto 1.1 is not found.

I manually updated the Mongo snapshot to what I think the correct value is. We'll have to see if that test passes in CI.

@srmagura
Copy link
Contributor Author

srmagura commented May 1, 2023

@B4nan I fixed some issues with the Mongo code, should be good now 🙂. I was able to run the tests locally by using my Mac.

@B4nan B4nan changed the title fix: fix several places where migration --name was not used fix: respect custom migration name in migration class names May 1, 2023
@B4nan B4nan changed the title fix: respect custom migration name in migration class names fix(migrations): respect custom migration name in migration class names May 1, 2023
@codecov
Copy link

codecov bot commented May 1, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (c012f95) 99.63% compared to head (7e5dd19) 99.63%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4294   +/-   ##
=======================================
  Coverage   99.63%   99.63%           
=======================================
  Files         214      214           
  Lines       14080    14083    +3     
  Branches     3316     3318    +2     
=======================================
+ Hits        14028    14031    +3     
  Misses         51       51           
  Partials        1        1           
Impacted Files Coverage Δ
...kages/migrations-mongodb/src/MigrationGenerator.ts 100.00% <ø> (ø)
...core/src/naming-strategy/AbstractNamingStrategy.ts 100.00% <100.00%> (ø)
packages/migrations-mongodb/src/Migrator.ts 97.77% <100.00%> (ø)
packages/migrations/src/MigrationGenerator.ts 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@B4nan B4nan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@B4nan B4nan merged commit c402a99 into mikro-orm:master May 1, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants