Regression: Add migration for omni rooms with no source (#24012)
parent
84da0abb28
commit
edc44c8a8d
@ -0,0 +1,20 @@ |
||||
import { Rooms } from '../../../app/models/server/raw'; |
||||
import { IOmnichannelRoom, OmnichannelSourceType } from '../../../definition/IRoom'; |
||||
import { addMigration } from '../../lib/migrations'; |
||||
|
||||
|
||||
addMigration({ |
||||
version: 252, |
||||
async up() { |
||||
await Rooms.updateMany( |
||||
{ $and: [{ t: 'l' }, { source: { $exists: false } }] }, |
||||
{ |
||||
$set: { |
||||
source: { |
||||
type: OmnichannelSourceType.OTHER, |
||||
} as IOmnichannelRoom['source'], |
||||
}, |
||||
}, |
||||
); |
||||
}, |
||||
}); |
||||
Loading…
Reference in new issue