From fb1b207db956155101ba6274c42a653c76b73e29 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Wed, 18 Sep 2019 16:08:02 +0100 Subject: [PATCH] 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 --- .../data/migrations/versions/3.0/10-remove-empty-strings.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/server/data/migrations/versions/3.0/10-remove-empty-strings.js b/core/server/data/migrations/versions/3.0/10-remove-empty-strings.js index eddaa2d2bc..5d225f29db 100644 --- a/core/server/data/migrations/versions/3.0/10-remove-empty-strings.js +++ b/core/server/data/migrations/versions/3.0/10-remove-empty-strings.js @@ -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(