Skip to content

feat(core/migrate): import txAdmin players database#16

Merged
Maximus7474 merged 1 commit into
mainfrom
feat/txadmin-migration
Jun 15, 2026
Merged

feat(core/migrate): import txAdmin players database#16
Maximus7474 merged 1 commit into
mainfrom
feat/txadmin-migration

Conversation

@FjamZoo

@FjamZoo FjamZoo commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

Description

Add a MASTER-only POST /api/migrate endpoint that ingests a txAdmin playersDB.json and imports players, identifiers, notes, bans, warns and whitelist approvals. Matching is by full identifier, so the import is idempotent and safe to re-run.
The import runs in a re-exec'd child process the parent pipes the raw JSON in and reads the summary back so a multi-MB migration never blocks the core event loop. Logged as migrate.txadmin in the audit trail.


Tests

  • Tested in development mode
  • Passes typecheck
  • Builds & runs on Windows
  • Builds & runs on Linux

Additional Notes

I tried using a normal worker, however that wasn't quite feasible due to the fact that a .exe already bundles all of our modules and cant contain a worker on top of it.

So having the bun child process was the second best thing IMO.

Comment thread apps/core/src/routes/api/migrate.ts
@Maximus7474 Maximus7474 merged commit 6d40df1 into main Jun 15, 2026
2 checks passed
@Maximus7474 Maximus7474 mentioned this pull request Jun 15, 2026
4 tasks
@FjamZoo FjamZoo deleted the feat/txadmin-migration branch June 29, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants