0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Update ghost/core/core/server/data/migrations/versions/5.94/2024-09-03-20-09-40-null-analytics-jobs-timings.js

Co-authored-by: Daniel Lockyer <hi@daniellockyer.com>
This commit is contained in:
Steve Larson 2024-09-05 07:52:17 -05:00 committed by GitHub
parent 84025ac3ae
commit d11bce4742
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,10 +8,9 @@ const {createTransactionalMigration} = require('../../utils');
module.exports = createTransactionalMigration( module.exports = createTransactionalMigration(
async function up(knex) { async function up(knex) {
try { try {
await knex.raw(` await knex('jobs')
DELETE FROM jobs .whereIn('name', ['email-analytics-latest-opened', 'email-analytics-latest-others', 'email-analytics-missing'])
WHERE name = 'email-analytics-latest-opened' OR name = 'email-analytics-latest-others' OR name = 'email-analytics-missing'; .del();
`);
} catch (error) { } catch (error) {
logging.info(`Failed to delete email analytics jobs: ${error.message}`); logging.info(`Failed to delete email analytics jobs: ${error.message}`);
} }