Commit 7b5b60ce authored by Henry Oswald's avatar Henry Oswald
Browse files

added track changes migration in again, we didn't add the setting

as a default before so needs 2nd migration
parent 563b9bfe
#This is needed because we forgot to add track changes into the default settings
Settings = require "settings-sharelatex"
fs = require("fs")
mongojs = require("mongojs")
ObjectId = mongojs.ObjectId
db = mongojs(Settings.mongo.url, ['users'])
_ = require("underscore")
BSON = db.bson.BSON
handleExit = () ->
console.log('Got signal. Shutting down.')
process.on 'SIGINT', handleExit
process.on 'SIGHUP', handleExit
exports.migrate = (client, done=()->) ->
patch = {
$set: {
'features.trackChanges': true
}
}
console.log ">> enabling trackChanges feature: ", patch
db.users.update {}, patch, {multi: true}, (err) ->
console.log "finished enabling trackChanges feature"
return done(err)
exports.rollback = (client, done) ->
done()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment