You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a knex 0.8.5 migration step fails, its Migrator._runBatch() function seems to catch the reported failure information, report it to the user as a warning message and then simply not pass it on.
I think that instead of doing this:
}).catch(function(error) {
helpers.warn('migrations failed with error: ' + error.message)
});
Or it might be even better to not force an end-user warning on your caller at all and let them deal with the failure however they want. For example, we have an automated test suite that makes sure all of our data migration scripts do their work successfully, and we'd rather not have any user warning displayed during those tests, but we really want the tests to fail in case of such errors.
In some cases the current 'returning undefined' implementation will cause the error to be completely ignored (happens in our tests), while in others it will cause random JavaScript errors, e.g. BlueBird promise function complaining about expecting to receive an array and receiving a single object instead (seen happening when running the actual database migration in our development environment).
The text was updated successfully, but these errors were encountered:
When a
knex
0.8.5 migration step fails, itsMigrator._runBatch()
function seems to catch the reported failure information, report it to the user as a warning message and then simply not pass it on.I think that instead of doing this:
Migrator._runBatch()
should do this:Or it might be even better to not force an end-user warning on your caller at all and let them deal with the failure however they want. For example, we have an automated test suite that makes sure all of our data migration scripts do their work successfully, and we'd rather not have any user warning displayed during those tests, but we really want the tests to fail in case of such errors.
In some cases the current 'returning
undefined
' implementation will cause the error to be completely ignored (happens in our tests), while in others it will cause random JavaScript errors, e.g. BlueBird promise function complaining about expecting to receive an array and receiving a single object instead (seen happening when running the actual database migration in our development environment).The text was updated successfully, but these errors were encountered: