The backups directory may have been created by Docker/root, making it
unwritable by the deploy user. The script now detects this and attempts
to fix permissions automatically (chmod, then sudo chown as fallback).
Also added shared/db/backups to .gitignore.
The raw 'source .env' pattern breaks when values contain special bash
characters like ) in passwords or database URLs. This caused deploy:remote
to fail with 'syntax error near unexpected token )'.
Changes:
- Created shared/scripts/lib/load-env.sh: reads .env line-by-line with
export instead of source, safely handling special characters
- Updated db-backup.sh, db-restore.sh, deploy-remote.sh, remote.sh to
use the shared loader
- Reordered deploy-remote.sh: git pull now runs first (step 1) so the
remote always has the latest scripts before running backup (step 2)
Tickets: #2, #3
- Remove duplicate type definitions from shared/lib/config.ts
- Import types from schema files (game-settings.ts, guild-settings.ts)
- Add GuildConfig interface to guild-settings.ts schema
- Rename ModerationConfig to ModerationCaseConfig in moderation.service.ts
- Delete shared/config/config.json and shared/scripts/migrate-config-to-db.ts
- Update settings API to use gameSettingsService exclusively
- Return DB format (strings) from API instead of runtime BigInts
- Fix moderation service tests to pass config as parameter
Breaking Changes:
- Removes legacy file-based configuration system
- API now returns database format with string values for BigInt fields