diff --git a/ghost/core/core/server/data/migrations/versions/5.9/2022-08-09-08-32-added-new-integration-type.js b/ghost/core/core/server/data/migrations/versions/5.9/2022-08-09-08-32-added-new-integration-type.js new file mode 100644 index 0000000000..85d2a5b11e --- /dev/null +++ b/ghost/core/core/server/data/migrations/versions/5.9/2022-08-09-08-32-added-new-integration-type.js @@ -0,0 +1,24 @@ +const logging = require('@tryghost/logging'); +const {createTransactionalMigration} = require('../../utils'); + +module.exports = createTransactionalMigration( + async function up(knex) { + logging.info('Changing Ghost Explore Integration to type "core"'); + await knex('integrations') + .where({ + name: 'Ghost Explore', + slug: 'ghost-explore' + }) + .update('type', 'core'); + }, + async function down(knex) { + logging.info('Changing Ghost Explore Integration to type "builtin"'); + + await knex('integrations') + .where({ + name: 'Ghost Explore', + slug: 'ghost-explore' + }) + .update('type', 'builtin'); + } +);