1
0
Fork 1
mirror of https://example.com synced 2024-11-23 23:36:39 +09:00
firefish/tools/migration/shell.1489951459.like-to-reactions.js

23 lines
333 B
JavaScript
Raw Normal View History

2017-03-20 04:24:19 +09:00
db.users.update({}, {
$unset: {
likes_count: 1,
liked_count: 1
}
}, false, true)
db.likes.renameCollection('post_reactions')
db.post_reactions.update({}, {
$set: {
reaction: 'like'
}
}, false, true)
db.posts.update({}, {
$rename: {
likes_count: 'reaction_counts.like'
}
}, false, true);
db.notifications.remove({})