🏗 Removed author_id column from the posts table

refs https://github.com/TryGhost/Toolbox/issues/230

- This is a first step to removal of `author_id` concept from the codebase. The aim is to see what parts break down from this changes an work backwards from there
This commit is contained in:
Naz 2022-04-26 20:18:41 +08:00 committed by naz
parent b2db80c9fe
commit 6d17d28d1a
2 changed files with 7 additions and 5 deletions

View File

@ -0,0 +1,7 @@
const {createDropColumnMigration} = require('../../utils');
module.exports = createDropColumnMigration('posts', 'author_id', {});
module.exports.down = async () => {
// noop - major version migrations are not backwards compatible
};

View File

@ -67,11 +67,6 @@ module.exports = {
nullable: false,
defaultTo: 'none'
},
/**
* @deprecated: single authors was superceded by multiple authors in Ghost 1.22.0
* If we keep it, then only, because you can easier query post.author_id than posts_authors[*].sort_order.
*/
author_id: {type: 'string', maxlength: 24, nullable: false},
created_at: {type: 'dateTime', nullable: false},
/**
* @deprecated: https://github.com/TryGhost/Ghost/issues/10286