rename norwegian locale when upgrading

This commit is contained in:
Bjørn Trondsen 2012-05-29 22:13:41 +02:00
parent 8b56ee5889
commit 6ac3d72aed
1 changed files with 4 additions and 0 deletions

View File

@ -357,6 +357,10 @@ if collection = db.collections.detect { |c| c.name == 'pages' }
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