diff --git a/ghost/core/core/server/data/migrations/versions/5.84/2024-06-05-08-42-34-populate-post-revisions-custom-excerpt.js b/ghost/core/core/server/data/migrations/versions/5.84/2024-06-05-08-42-34-populate-post-revisions-custom-excerpt.js index 1986c0a1cb..e6fe2e6817 100644 --- a/ghost/core/core/server/data/migrations/versions/5.84/2024-06-05-08-42-34-populate-post-revisions-custom-excerpt.js +++ b/ghost/core/core/server/data/migrations/versions/5.84/2024-06-05-08-42-34-populate-post-revisions-custom-excerpt.js @@ -1,30 +1,9 @@ const logging = require('@tryghost/logging'); const {createTransactionalMigration} = require('../../utils'); -const DatabaseInfo = require('@tryghost/database-info'); module.exports = createTransactionalMigration( - async function up(knex) { - logging.info('Populating post_revisions.custom_excerpt with post.excerpt'); - - if (DatabaseInfo.isSQLite(knex)) { - // SQLite doesn't support JOINs in UPDATE queries - await knex.raw(` - UPDATE post_revisions - SET custom_excerpt = ( - SELECT posts.custom_excerpt - FROM posts - WHERE post_revisions.post_id = posts.id - ) - `); - } else { - await knex.raw(` - UPDATE post_revisions - JOIN posts ON post_revisions.post_id = posts.id - SET post_revisions.custom_excerpt = posts.custom_excerpt - `); - } - - logging.info('Finished populating post_revisions.custom_excerpt'); + async function up() { + logging.warn('Skipping migration - noop'); }, async function down() { // Not required