From da8d953d14cdc1a468b1dc3de1e5612d167b34a0 Mon Sep 17 00:00:00 2001 From: yuukiwww <0xv75b42326631e@au.com> Date: Fri, 14 Jun 2024 03:08:46 +0900 Subject: [PATCH] =?UTF-8?q?Create=20=E5=A4=AA=E9=BC=93=E3=82=A6=E3=82=A7?= =?UTF-8?q?=E3=83=96=E3=81=AE=E3=83=87=E3=83=BC=E3=82=BF=E3=83=99=E3=83=BC?= =?UTF-8?q?=E3=82=B9.txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 太鼓ウェブのデータベース.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 太鼓ウェブのデータベース.txt diff --git a/太鼓ウェブのデータベース.txt b/太鼓ウェブのデータベース.txt new file mode 100644 index 0000000..f5d96ef --- /dev/null +++ b/太鼓ウェブのデータベース.txt @@ -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 " -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