Create 太鼓ウェブのデータベース.txt
This commit is contained in:
parent
7722e09a86
commit
da8d953d14
1 changed files with 20 additions and 0 deletions
20
太鼓ウェブのデータベース.txt
Normal file
20
太鼓ウェブのデータベース.txt
Normal file
|
@ -0,0 +1,20 @@
|
|||
エクスポート
|
||||
|
||||
$ docker exec -i taiko-mongo mongoexport --db taiko --collection users --out /dev/stdout | sort -n > users.json
|
||||
$ docker exec -i taiko-mongo mongoexport --db taiko --collection songs --out /dev/stdout | sort -n > songs.json
|
||||
$ docker exec -i taiko-mongo mongoexport --db taiko --collection scores --out /dev/stdout | sort -n > scores.json
|
||||
|
||||
コミット&プッシュ
|
||||
|
||||
$ git add *.json
|
||||
$ git commit --author="BOT <bot@example.com>" -m "$(git diff --name-only --cached | paste -s -d ' ') が更新されました"
|
||||
$ git push origin main
|
||||
|
||||
インポート
|
||||
|
||||
$ docker cp users.json taiko-mongo:/a
|
||||
$ docker exec -i taiko-mongo mongoimport --db taiko --collection users /a
|
||||
$ docker cp songs.json taiko-mongo:/b
|
||||
$ docker exec -i taiko-mongo mongoimport --db taiko --collection songs /b
|
||||
$ docker cp scores.json taiko-mongo:/c
|
||||
$ docker exec -i taiko-mongo mongoimport --db taiko --collection scores /c
|
Loading…
Add table
Reference in a new issue