Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
hub
overleaf
Commits
54afc104
Commit
54afc104
authored
Dec 02, 2016
by
Shane Kilkelly
Browse files
Add a dummy rollback, clean up.
parent
45d86c3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
migrations/4_update_user_features.coffee
View file @
54afc104
...
...
@@ -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
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment