diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-03-28 16:20:46 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-03-28 16:20:46 +0900 |
| commit | 7d4d9dbaa61f2eaaa66eac2d9ac282c41044e2c7 (patch) | |
| tree | a1f6799795efda49c0ba0985405474c2bd32b629 /tools | |
| parent | wip (diff) | |
| download | sharkey-7d4d9dbaa61f2eaaa66eac2d9ac282c41044e2c7.tar.gz sharkey-7d4d9dbaa61f2eaaa66eac2d9ac282c41044e2c7.tar.bz2 sharkey-7d4d9dbaa61f2eaaa66eac2d9ac282c41044e2c7.zip | |
wip
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/migration/shell.camel-case.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tools/migration/shell.camel-case.js b/tools/migration/shell.camel-case.js index 9cb0baaaf5..afe831e5b7 100644 --- a/tools/migration/shell.camel-case.js +++ b/tools/migration/shell.camel-case.js @@ -194,3 +194,36 @@ db.swSubscriptions.update({}, { user_id: 'userId', } }, false, true); + +db.users.update({}, { + $rename: { + created_at: 'createdAt', + deleted_at: 'deletedAt', + followers_count: 'followersCount', + following_count: 'followingCount', + posts_count: 'postsCount', + drive_capacity: 'driveCapacity', + username_lower: 'usernameLower', + avatar_id: 'avatarId', + banner_id: 'bannerId', + pinned_post_id: 'pinnedPostId', + is_suspended: 'isSuspended', + host_lower: 'hostLower', + 'twitter.access_token': 'twitter.accessToken', + 'twitter.access_token_secret': 'twitter.accessTokenSecret', + 'twitter.user_id': 'twitter.userId', + 'twitter.screen_name': 'twitter.screenName', + 'line.user_id': 'line.userId', + last_used_at: 'lastUsedAt', + is_bot: 'isBot', + is_pro: 'isPro', + two_factor_secret: 'twoFactorSecret', + two_factor_enabled: 'twoFactorEnabled', + client_settings: 'clientSettings' + }, + $unset: { + likes_count: '', + liked_count: '', + latest_post: '' + } +}, false, true); |