summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/migration/shell.camel-case.js22
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);
+