Skip to content

Commit

Permalink
rename norwegian locale when upgrading
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorntrondsen committed May 29, 2012
1 parent 8b56ee5 commit 6ac3d72
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions script/upgrade_v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,10 @@ def get_locale(site_id)
collection.update({}, { '$unset' => { 'parts' => '1', 'path' => '1', 'layout_id' => '1' } }, { :multi => true })
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})

# some cleaning
%w(asset_collections liquid_templates delayed_backend_mongoid_jobs).each do |name|
db.drop_collection name
Expand Down

0 comments on commit 6ac3d72

Please sign in to comment.