Skip to content
Matias Lescano edited this page Oct 5, 2015 · 17 revisions

Database scripts

Rename collection laws to topics

In a MongoDB shell please type the following:

db.laws.renameCollection('topics')

Rename field summary to body(not applicable)

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);
  })

Update comments

db.comments
  .update({ context: 'summary' },
    { $set: { context: 'body' } }, 
    { multi: true })

db.comments
  .update({ context: 'law' },
    { $set: { context: 'topic' } },
    { multi: true })

Update Notifier configuration

As of 1.0 the Notifier can be used as a standalone server (the way that you probably have it right now) or as an embebed app super easy to configure.

To continue using your standalone DemocracyOS/notifier-server simply update it to >= 1.0.0.

If you want to use the embebed notifier, first tear down your notifier-server, and then simply configure the config values.

Clone this wiki locally