[FIX] Some apps were not correctly enabled during startup in HA environments (#19763)
Co-authored-by: Diego Sampaio <chinello@gmail.com>pull/19903/head
parent
3e2038d193
commit
5b3c3b88e5
@ -0,0 +1,19 @@ |
||||
import { MongoInternals } from 'meteor/mongo'; |
||||
|
||||
import { Migrations } from '../../../app/migrations'; |
||||
|
||||
Migrations.add({ |
||||
version: 212, |
||||
up() { |
||||
const { mongo } = MongoInternals.defaultRemoteCollectionDriver(); |
||||
const apps = mongo.db.collection('rocketchat_apps'); |
||||
|
||||
Promise.await(apps.updateMany({ |
||||
status: 'initialized', |
||||
}, { |
||||
$set: { |
||||
status: 'manually_disabled', |
||||
}, |
||||
})); |
||||
}, |
||||
}); |
Loading…
Reference in new issue