diff options
author | Lauri Ojansivu <x@xet7.org> | 2019-07-15 22:47:30 +0300 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2019-07-15 22:47:30 +0300 |
commit | 583f32e5c5233b1fe435dad23a95ee2872b7cc7c (patch) | |
tree | 13966d1dba8b1e4c1d6c62f2a3744d2d919a755c | |
parent | 2cedbcb9b334cd497874736bbb740a1d5c5acb6c (diff) | |
download | wekan-583f32e5c5233b1fe435dad23a95ee2872b7cc7c.tar.gz wekan-583f32e5c5233b1fe435dad23a95ee2872b7cc7c.tar.bz2 wekan-583f32e5c5233b1fe435dad23a95ee2872b7cc7c.zip |
Teams/Organizations part 2, in progress. Table: org, add index for name field.
Thanks to xet7 !
Related #802
-rw-r--r-- | models/org.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/models/org.js b/models/org.js index cdbcbafc..3d41a436 100644 --- a/models/org.js +++ b/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; |