2
0
Эх сурвалжийг харах

Teams/Organizations part 2, in progress. Table: org, add index for name field.

Thanks to xet7 !

Related #802
Lauri Ojansivu 6 жил өмнө
parent
commit
583f32e5c5
1 өөрчлөгдсөн 7 нэмэгдсэн , 0 устгасан
  1. 7 0
      models/org.js

+ 7 - 0
models/org.js

@@ -118,4 +118,11 @@ Org.attachSchema(
   }),
 );
 
+if (Meteor.isServer) {
+  // Index for Organization name.
+  Meteor.startup(() => {
+    Org._collection._ensureIndex({ name: -1 });
+  });
+}
+
 export default Org;