mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-02 15:55:08 +03:00
fixup! Added validation to posts status column
This commit is contained in:
parent
66652b6ea9
commit
ada0e7975b
@ -3,6 +3,8 @@ const {createTransactionalMigration} = require('../../utils');
|
||||
|
||||
module.exports = createTransactionalMigration(
|
||||
async function up(knex) {
|
||||
logging.info(`Updating posts with invalid statuses to 'draft'`);
|
||||
|
||||
const affectedRows = await knex('posts')
|
||||
.update('status', 'draft')
|
||||
.whereNotIn('status', ['published', 'draft', 'scheduled', 'sent']);
|
||||
|
Loading…
Reference in New Issue
Block a user