mirror of
https://github.com/wekan/wekan.git
synced 2026-02-26 18:04:06 +01:00
Migrate createIndex to createIndexAsync
This commit is contained in:
parent
60ecddfce4
commit
ca2083c858
32 changed files with 112 additions and 110 deletions
|
|
@ -2088,16 +2088,16 @@ Boards.before.insert((userId, doc) => {
|
|||
|
||||
if (Meteor.isServer) {
|
||||
// Let MongoDB ensure that a member is not included twice in the same board
|
||||
Meteor.startup(() => {
|
||||
Boards._collection.createIndex({ modifiedAt: -1 });
|
||||
Boards._collection.createIndex(
|
||||
Meteor.startup(async () => {
|
||||
await Boards._collection.createIndexAsync({ modifiedAt: -1 });
|
||||
await Boards._collection.createIndexAsync(
|
||||
{
|
||||
_id: 1,
|
||||
'members.userId': 1,
|
||||
},
|
||||
{ unique: true },
|
||||
);
|
||||
Boards._collection.createIndex({ 'members.userId': 1 });
|
||||
await Boards._collection.createIndexAsync({ 'members.userId': 1 });
|
||||
});
|
||||
|
||||
// Genesis: the first activity of the newly created board
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue