summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-03-28 13:32:05 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-03-28 13:32:05 +0900
commit69cef75b53671ccd7e0a199d31fa2d6d7c91fe78 (patch)
tree80441ef9023587db260b6db726e6c833f43e02b8 /tools
parentwip (diff)
downloadsharkey-69cef75b53671ccd7e0a199d31fa2d6d7c91fe78.tar.gz
sharkey-69cef75b53671ccd7e0a199d31fa2d6d7c91fe78.tar.bz2
sharkey-69cef75b53671ccd7e0a199d31fa2d6d7c91fe78.zip
wip
Diffstat (limited to 'tools')
-rw-r--r--tools/migration/shell.camel-case.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/migration/shell.camel-case.js b/tools/migration/shell.camel-case.js
index 9f07bd946d..11c6fe401d 100644
--- a/tools/migration/shell.camel-case.js
+++ b/tools/migration/shell.camel-case.js
@@ -1,3 +1,5 @@
+// このスクリプトを走らせる前か後に notifications コレクションはdropしてください
+
db.access_tokens.renameCollection('accessTokens');
db.accessTokens.update({}, {
$rename: {
@@ -110,3 +112,21 @@ db.mute.update({}, {
}
}, false, true);
+db.othello_games.renameCollection('othelloGames');
+db.othelloGames.update({}, {
+ $rename: {
+ created_at: 'createdAt',
+ started_at: 'startedAt',
+ is_started: 'isStarted',
+ is_ended: 'isEnded',
+ user1_id: 'user1Id',
+ user2_id: 'user2Id',
+ user1_accepted: 'user1Accepted',
+ user2_accepted: 'user2Accepted',
+ winner_id: 'winnerId',
+ 'settings.is_llotheo': 'settings.isLlotheo',
+ 'settings.can_put_everywhere': 'settings.canPutEverywhere',
+ 'settings.looped_board': 'settings.loopedBoard',
+ }
+}, false, true);
+