Switch to side-by-side view
--- a +++ b/scripts/migrations/030-set-trove-show_as_skill.py @@ -0,0 +1,21 @@ +import re + +from allura import model as M + + +def main(): + categories_regex = '|'.join([ + 'Translations', + 'Programming Language', + 'User Interface', + 'Database Environment', + 'Operating System', + 'Topic', + ]) + M.TroveCategory.query.update( + {'fullname': re.compile(r'^(%s)' % categories_regex)}, + {'$set': {'show_as_skill': True}}, + multi=True) + +if __name__ == '__main__': + main()