Skip to content

Commit

Permalink
Fixed error rolling back the "remove empty strings" migration
Browse files Browse the repository at this point in the history
no issue

- rollbacks have switched to using transactions but the migration code was copied from an old migration coded before that switch
- `down()` is no longer called with an object that contains a `connection` key, it has `transacting` instead
  • Loading branch information
kevinansfield committed Sep 18, 2019
1 parent 6f9026a commit fb1b207
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ module.exports.up = ({transacting}) => {
);
};

module.exports.down = ({connection}) => {
const replaceNullWithEmptyString = createReplace(connection, null, '');
module.exports.down = ({transacting}) => {
const replaceNullWithEmptyString = createReplace(transacting, null, '');

return Promise.all(
tablesToUpdate.map(({tableName, columns}) => Promise.all(
Expand Down

0 comments on commit fb1b207

Please sign in to comment.