From 15951aa1d55756bfcc4d43ea76d2b84b5833dfb6 Mon Sep 17 00:00:00 2001 From: Naz Date: Wed, 27 Apr 2022 16:22:52 +0800 Subject: [PATCH] Removed unneeded author_id cleanup refs https://github.com/TryGhost/Toolbox/issues/230 - As the `author_id` column is gone there's no need to cleanup the posts table when reassigning user's posts --- core/server/models/relations/authors.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/core/server/models/relations/authors.js b/core/server/models/relations/authors.js index f4710ced7d..39cca365bf 100644 --- a/core/server/models/relations/authors.js +++ b/core/server/models/relations/authors.js @@ -358,14 +358,6 @@ module.exports.extendModel = function extendModel(Post, Posts, ghostBookshelf) { .transacting(trx) .where('author_id', authorId) .del(); - // --------- secondary author cleanup END - - // make the owner a primary author in post table - // remove this statement once 'author' concept is gone - await knex('posts') - .transacting(trx) - .where('author_id', authorId) - .update('author_id', ownerId); } catch (err) { throw new errors.InternalServerError({err: err}); }