a little bit of cleaning for the upgrade scripts

This commit is contained in:
did 2012-05-29 16:24:28 -07:00
parent b706d50bdf
commit 261575eb94
2 changed files with 7 additions and 3 deletions

View File

@ -44,3 +44,7 @@ collection.find.each do |page|
collection.update({ '_id' => page['_id'] }, { '$set' => { 'redirect_url' => { locale => page['redirect_url'] } } })
end
# Update Norwegian locale from 'no' to 'nb'
collection = db.collections.detect { |c| c.name == 'locomotive_accounts' }
collection.update({ 'locale' => 'no' }, { '$set' => { 'locale' => 'nb' }}, { :multi => true })