fix(setup): reduce friction in installation procedure

- Add Language default ("jp") so missing field no longer produces empty
  string, and include language selector in setup wizard
- Add --setup flag to re-run wizard even when config.json exists,
  providing a recovery path for corrupted configs
- Auto-apply seed data on fresh databases so users who skip the wizard
  still get shops, events, and gacha
- Fix stale docs referencing non-existent init/setup.sh and
  schemas/patch-schema/ in docker/README, CONTRIBUTING, and README
This commit is contained in:
Houmgaor
2026-02-23 23:39:49 +01:00
parent 210cfa1fd1
commit bcdc4e0b7e
7 changed files with 67 additions and 39 deletions

View File

@@ -197,14 +197,10 @@ Multiple channel servers can run simultaneously, organized by world types: Newbi
## Database Schemas
Erupe uses a structured schema system:
Erupe uses an embedded auto-migrating schema system. Migrations in [server/migrations/sql/](./server/migrations/sql/) are applied automatically on startup — no manual SQL steps needed.
- **Initialization Schema**: Bootstraps database to version 9.1.0
- **Update Schemas**: Production-ready updates for new releases
- **Patch Schemas**: Development updates (subject to change)
- **Seed Data**: Demo templates for shops, distributions, events, and gacha in [server/migrations/seed/](./server/migrations/seed/)
**Note**: Only use patch schemas if you're following active development. They get consolidated into update schemas on release.
- **Migrations**: Numbered SQL files (`0001_init.sql`, `0002_*.sql`, ...) tracked in a `schema_version` table
- **Seed Data**: Demo templates for shops, distributions, events, and gacha in [server/migrations/seed/](./server/migrations/seed/) — applied automatically on fresh databases
## Development
@@ -237,7 +233,7 @@ go test -v -race ./... # Check for race conditions (mandatory before merging
### Database schema errors
- Ensure all patch files are applied in order
- Schema migrations run automatically on startup — check the server logs for migration errors
- Check PostgreSQL logs for detailed error messages
- Verify database user has sufficient privileges