repo.or.cz
/
gitter.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge branch 'hotfix/21.56.9' into master
[gitter.git]
/
scripts
/
useful-queries
/
clean-tags.mongo
blob
adbc5d87427e629c1783d93686d76ff2f6c05192
1
2
db.tagsynonyms.find().forEach(function(t) {
3
db.troupes.update({
4
tags: { $in: [t.synonyms] }
5
}, {
6
$addToSet: {
7
tags: t.name
8
},
9
$pullAll: {
10
tags: [t.synonyms]
11
}
12
}, {
13
multi: true
14
});
15
});