Files
zkldi_Tachi/Justfile-migrate
T
zk dd2447c848 feat: i'm really worried about this bit, but empiricism will win (#41)
* feat: i'm really worried about this bit, but empiricism will win

* feat: light driving

* feat: migrate over user game status

* feat: custom scrollbar, and migrate over settings

* feat: eamusement csv movement

* fix: rm debug

* feat: shark reaction

* checkpoint

* feat: get tests passing again

* checkpoint

* feat: bms table sync

* feat: ugs snapshot and backsync bms pms

* feat: checkpoint

* feat: iidx playlists

* manic depression

* continues

* fly

* happy house

* we're happy here

* I think. 6 years is enough for me. This is killing me, and I am dying.
2026-03-31 23:37:51 +01:00

30 lines
1.1 KiB
Plaintext

# Justfile for the v3 migration. To be deleted once everything has moved over.
# do the full migration suite.
migrate-v3:
just gen
just seeds-v3-migrate
just mongo-to-pg kamai kamai
just mongo-to-pg boku boku
# Migrate all MongoDB data into Postgres (run once, requires both DBs to be reachable).
mongo-to-pg POSTGRES_DB_NAME MONGO_DB_NAME:
just db-cheap-reset "{{ POSTGRES_DB_NAME }}"
cd typescript/server && VERSION=$(jq -r .version package.json) COMMIT_HASH=$(git rev-parse --short HEAD) POSTGRES_URL="{{POSTGRES_URL}}/{{POSTGRES_DB_NAME}}" MONGO_URL="mongodb://tachi-mongo/{{MONGO_DB_NAME}}" \
bun run src/scripts/migrate-to-postgres.ts
# Rollback the seeds to the state stored somewhere (v2 keeps seeds in seeds/collections, v3 in db/seeds).
seeds-rollback ROLLBACK_DIR="/host-pc/Documents/Repos/Tachi/seeds/collections":
rsync -avz --delete "{{ROLLBACK_DIR}}/" db/seeds
seeds-v3-migrate: seeds-rollback
#!/usr/bin/env bash
set -euo pipefail
cd "typescript/seeds-scripts"
for script in $(ls -1 rerunners/v3/*.ts); do
bun run "./$script"
done
just fmt