diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-03-28 13:13:10 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-03-28 13:13:10 +0900 |
| commit | 73bb57480b01ece02bdf43866389bc9ef478f271 (patch) | |
| tree | 83629b3b309c9dd5920a4782113c0e44e33bccfa /tools/migration | |
| parent | Merge remote-tracking branch 'refs/remotes/origin/master' into #1288-2 (diff) | |
| download | sharkey-73bb57480b01ece02bdf43866389bc9ef478f271.tar.gz sharkey-73bb57480b01ece02bdf43866389bc9ef478f271.tar.bz2 sharkey-73bb57480b01ece02bdf43866389bc9ef478f271.zip | |
wip
Diffstat (limited to 'tools/migration')
| -rw-r--r-- | tools/migration/shell.camel-case.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/migration/shell.camel-case.js b/tools/migration/shell.camel-case.js index 6d6b01a071..ac0476af0c 100644 --- a/tools/migration/shell.camel-case.js +++ b/tools/migration/shell.camel-case.js @@ -79,3 +79,25 @@ db.following.update({}, { follower_id: 'followerId', } }, false, true); + +db.messaging_histories.renameCollection('messagingHistories'); +db.messagingHistories.update({}, { + $rename: { + updated_at: 'updatedAt', + user_id: 'userId', + partner: 'partnerId', + message: 'messageId', + } +}, false, true); + +db.messaging_messages.renameCollection('messagingMessages'); +db.messagingMessages.update({}, { + $rename: { + created_at: 'createdAt', + user_id: 'userId', + recipient_id: 'recipientId', + file_id: 'fileId', + is_read: 'isRead' + } +}, false, true); + |