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

Add option to make migrator 'quiet' #4124

Closed
Explodey54 opened this issue Mar 13, 2023 · 3 comments · Fixed by #4182
Closed

Add option to make migrator 'quiet' #4124

Explodey54 opened this issue Mar 13, 2023 · 3 comments · Fixed by #4182
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Explodey54
Copy link

Is your feature request related to a problem? Please describe.
When I'm running tests via Jest I would like to drop schema before every test case, but that results in a lot of 'noise' in log output:

console.log
    Processing 'Migration20230222121600InitDb'

      at ../node_modules/@mikro-orm/migrations/Migrator.js:94:45
          at Array.map (<anonymous>)

console.log
    Applied 'Migration20230222121600InitDb'

      at ../node_modules/@mikro-orm/migrations/Migrator.js:95:44
          at Array.map (<anonymous>)

Describe the solution you'd like
Is it possible to add 'quiet' boolean option to migrator config? Something like this:

migrations: {
    quiet: true, // disables all log output from migrator, default: false
},
@Explodey54 Explodey54 added the enhancement New feature or request label Mar 13, 2023
@B4nan
Copy link
Member

B4nan commented Mar 13, 2023

Maybe better call it silent instead?

The change would be here:

@B4nan B4nan added the good first issue Good for newcomers label Mar 13, 2023
@AnimeshRy
Copy link
Contributor

@B4nan I'd like to take the issue.

@B4nan
Copy link
Member

B4nan commented Mar 20, 2023

Sure, go for it. As mentioned above, I'd call it silent, and don't forget to implement it for both sql and mongo migrators.

B4nan pushed a commit that referenced this issue Mar 30, 2023
This provides an option to make the migration logs silent.

Closes #4124
jsprw pushed a commit to jsprw/mikro-orm-full-text-operators that referenced this issue May 7, 2023
…o-orm#4182)

This provides an option to make the migration logs silent.

Closes mikro-orm#4124
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants