1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-11 21:28:14 +09:00
hotomoe/tools/migration/nighthike/11.js

36 lines
624 B
JavaScript
Raw Normal View History

2018-04-08 02:30:37 +09:00
db.pollVotes.update({}, {
$rename: {
postId: 'noteId',
}
}, false, true);
db.postReactions.renameCollection('noteReactions');
db.noteReactions.update({}, {
$rename: {
postId: 'noteId',
}
}, false, true);
db.postWatching.renameCollection('noteWatching');
db.noteWatching.update({}, {
$rename: {
postId: 'noteId',
}
}, false, true);
db.posts.renameCollection('notes');
db.notes.update({}, {
$rename: {
_repost: '_renote',
repostId: 'renoteId',
}
}, false, true);
db.users.update({}, {
$rename: {
postsCount: 'notesCount',
pinnedPostId: 'pinnedNoteId',
latestPost: 'latestNote'
}
}, false, true);