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:
parent
84025ac3ae
commit
d11bce4742
1 changed files with 3 additions and 4 deletions
|
@ -8,10 +8,9 @@ const {createTransactionalMigration} = require('../../utils');
|
|||
module.exports = createTransactionalMigration(
|
||||
async function up(knex) {
|
||||
try {
|
||||
await knex.raw(`
|
||||
DELETE FROM jobs
|
||||
WHERE name = 'email-analytics-latest-opened' OR name = 'email-analytics-latest-others' OR name = 'email-analytics-missing';
|
||||
`);
|
||||
await knex('jobs')
|
||||
.whereIn('name', ['email-analytics-latest-opened', 'email-analytics-latest-others', 'email-analytics-missing'])
|
||||
.del();
|
||||
} catch (error) {
|
||||
logging.info(`Failed to delete email analytics jobs: ${error.message}`);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue