diff --git a/server/startup/migrations/index.ts b/server/startup/migrations/index.ts index 5be02fd851d..f87385facdc 100644 --- a/server/startup/migrations/index.ts +++ b/server/startup/migrations/index.ts @@ -77,4 +77,5 @@ import './v250'; import './v251'; import './v252'; import './v253'; +import './v254'; import './xrun'; diff --git a/server/startup/migrations/v254.ts b/server/startup/migrations/v254.ts new file mode 100644 index 00000000000..c9abebd67ed --- /dev/null +++ b/server/startup/migrations/v254.ts @@ -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 }); + }, +});