0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Fixed error rolling back the "remove empty strings" migration

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
This commit is contained in:
Kevin Ansfield 2019-09-18 16:08:02 +01:00
parent 6f9026af6b
commit fb1b207db9

View file

@ -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(