Removing console.log() from legacy migrations #374
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DEFRA/water-abstraction-team#91
This PR is focusing on removing console.log() from legacy migrations as per Teams issue. When working on DEFRA/water-abstraction-service#2227 we again broke GitHub CI because of the volume of output from our migrations.
In DEFRA/water-abstraction-team#65 we thought we'd dealt with the issue believing that db-mgrate's verbose() argument was to blame.
Looking into the issue in the stuck bill run we came across a db-migrate/node-db-migrate#453 (comment) that gave us a 🤦 !
The db-migrate template used when generating migrations includes a console.log() that outputs the migration file read in. So, though we might not be outputting all the SQL being fired, we are still outputting the contents of every single migration file!
We definitely don't need to see this and it should remove the chance of us breaking the build in this way once and for all.
So, this issue is about going into the existing migrations and removing the 2 console.log('received data: ' + data) lines in each across all repos.