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:
parent
c0d82122b0
commit
5384944fa4
1 changed files with 2 additions and 0 deletions
|
@ -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']);
|
||||
|
|
Loading…
Add table
Reference in a new issue