0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Added log line before updating user statuses

- this makes it obvious where we are in the flow and its clear we're
  inside this migration if we see that log line
This commit is contained in:
Daniel Lockyer 2022-05-10 16:46:33 +01:00
parent c0d82122b0
commit 5384944fa4
No known key found for this signature in database
GPG key ID: D21186F0B47295AD

View file

@ -3,6 +3,8 @@ const {createTransactionalMigration} = require('../../utils');
module.exports = createTransactionalMigration(
async function up(knex) {
logging.info(`Updating users with invalid statuses to 'inactive'`);
const affectedRows = await knex('users')
.update('status', 'inactive')
.whereNotIn('status', ['active', 'inactive', 'locked', 'warn-1', 'warn-2', 'warn-3', 'warn-4']);