-
Notifications
You must be signed in to change notification settings - Fork 617
Migrating to 1.0
Matias Lescano edited this page Oct 5, 2015
·
17 revisions
In a MongoDB shell please type the following:
db.laws.renameCollection('topics')
summary field was renamed to body (#901). For backwards support you have to run in a MongoDB shell:
db.topics
.find({})
.snapshot()
.forEach(function (e) {
e.body = e.summary
delete e.summary
db.topics.save(e)
})db.comments
.update({ context: 'summary' },
{ $set: { context: 'body' } },
{ multi: true })
db.comments
.update({ context: 'law' },
{ $set: { context: 'topic' } },
{ multi: true })Visit our official website - Developed by Democracia en Red and contributors from the world over!