parent
c7106d250c
commit
a1b490afa7
167 changed files with 4440 additions and 1762 deletions
35
tools/migration/nighthike/11.js
Normal file
35
tools/migration/nighthike/11.js
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
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);
|
||||
Loading…
Add table
Add a link
Reference in a new issue