Skip to content

Conversation

gadgetmies
Copy link

Previously setting the db-migrate instance isSilent flag did not prevent the printing of the SQL migration files. This caused a huge amount of noise in the output and there was no way to prevent this when calling the up()-function. If you wanted to prevent logging, you would either have to disable those completely by removing the console.log calls, implement your own logic for the logging or do what I did in this PR i.e. modify the code in the template to only log the SQL if the isSilent flag is not set.

Although it would be better to have the log function available also in the migration scripts in order to better control the amount of logging, AFAICT doing so would need a larger change. I'm sure many users would still appreciate having even the use of isSilent in the templates by default.

Previously setting the db-migrate instance isSilent flag did not prevent the printing of the SQL migration files
This causes a huge amount of noise in the output and there was no way to prevent this when calling the
up()-function.

Signed-off-by: Gadgetmies <[email protected]>
@gadgetmies gadgetmies force-pushed the use-is-silent-in-sql-template branch from 30ba2da to d040c41 Compare November 29, 2022 21:11
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.

1 participant