a little bit of cleaning for the upgrade scripts
This commit is contained in:
parent
b706d50bdf
commit
261575eb94
@ -43,4 +43,8 @@ collection.find.each do |page|
|
|||||||
locale = get_locale(page['site_id'])
|
locale = get_locale(page['site_id'])
|
||||||
|
|
||||||
collection.update({ '_id' => page['_id'] }, { '$set' => { 'redirect_url' => { locale => page['redirect_url'] } } })
|
collection.update({ '_id' => page['_id'] }, { '$set' => { 'redirect_url' => { locale => page['redirect_url'] } } })
|
||||||
end
|
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 })
|
@ -358,8 +358,8 @@ if collection = db.collections.detect { |c| c.name == 'pages' }
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Update Norwegian locale from 'no' to 'nb'
|
# Update Norwegian locale from 'no' to 'nb'
|
||||||
if collection = db.collections.detect {|c| c.name == 'locomotive_accounts'}
|
if collection = db.collections.detect { |c| c.name == 'locomotive_accounts' }
|
||||||
collection.update({ 'locale' => 'no' }, { '$set' => {'locale' => 'nb'}}, {:multi => true})
|
collection.update({ 'locale' => 'no' }, { '$set' => { 'locale' => 'nb' } }, { :multi => true })
|
||||||
end
|
end
|
||||||
|
|
||||||
# some cleaning
|
# some cleaning
|
||||||
|
Loading…
Reference in New Issue
Block a user