From afcd6b9f53e921c4d967e6a8951dad0af87c5262 Mon Sep 17 00:00:00 2001 From: Shane Kilkelly Date: Fri, 2 Dec 2016 14:12:52 +0000 Subject: [PATCH] Add a dummy rollback, clean up. --- server-ce/migrations/4_update_user_features.coffee | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server-ce/migrations/4_update_user_features.coffee b/server-ce/migrations/4_update_user_features.coffee index 0a13416e5c..8704c23ec4 100644 --- a/server-ce/migrations/4_update_user_features.coffee +++ b/server-ce/migrations/4_update_user_features.coffee @@ -6,13 +6,16 @@ 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 -module.exports.migrate = (client, done=()->) -> + +exports.migrate = (client, done=()->) -> patch = { $set: { features: { @@ -30,3 +33,7 @@ module.exports.migrate = (client, done=()->) -> db.users.update {}, patch, {multi: true}, (err) -> console.log "finished updating all user features" return done(err) + + +exports.rollback = (client, done) -> + done()