summaryrefslogtreecommitdiff
path: root/tools/migration
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-03-28 16:04:44 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-03-28 16:04:44 +0900
commitbed17efd1b40e05e49b4de50c118f2acf804b95e (patch)
tree405fbe0b07dde1c05ecb6703b0e99f630a0f6b32 /tools/migration
parentwip (diff)
downloadsharkey-bed17efd1b40e05e49b4de50c118f2acf804b95e.tar.gz
sharkey-bed17efd1b40e05e49b4de50c118f2acf804b95e.tar.bz2
sharkey-bed17efd1b40e05e49b4de50c118f2acf804b95e.zip
wip
Diffstat (limited to 'tools/migration')
-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 2a5456b4d0..326d0a1b0f 100644
--- a/tools/migration/shell.camel-case.js
+++ b/tools/migration/shell.camel-case.js
@@ -156,3 +156,25 @@ db.postReactions.update({}, {
post_id: 'postId'
}
}, false, true);
+
+db.post_watching.renameCollection('postWatching');
+db.postWatching.update({}, {
+ $rename: {
+ created_at: 'createdAt',
+ user_id: 'userId',
+ post_id: 'postId'
+ }
+}, false, true);
+
+db.posts.update({}, {
+ $rename: {
+ created_at: 'createdAt',
+ channel_id: 'channelId',
+ user_id: 'userId',
+ app_id: 'appId',
+ media_ids: 'mediaIds',
+ reply_id: 'replyId',
+ repost_id: 'repostId',
+ via_mobile: 'viaMobile'
+ }
+}, false, true);