[FIX] Startup errors creating indexes (#24409)
parent
949115a5ed
commit
d254da574a
@ -0,0 +1,13 @@ |
||||
import { addMigration } from '../../lib/migrations'; |
||||
import { Users, Rooms } from '../../../app/models/server'; |
||||
|
||||
addMigration({ |
||||
version: 254, |
||||
up() { |
||||
Users.tryDropIndex({ bio: 1 }); |
||||
Users.tryEnsureIndex({ bio: 1 }, { unique: 1 }); |
||||
|
||||
Rooms.tryDropIndex({ prid: 1 }); |
||||
Rooms.tryEnsureIndex({ prid: 1 }, { sparse: true }); |
||||
}, |
||||
}); |
||||
Loading…
Reference in new issue