1.5 KiB
1.5 KiB
Server Migration Checklist (BladeX + Martial)
1. Database initialization policy
- MySQL init mount must point to
./database/initonly. - Keep
database/initminimal. Avoid full backups or system DB dumps. - Schema evolution should be managed by Flyway migrations.
2. Flyway pre-check
Before first migration on an existing environment, run validate with pending ignored:
mvn -Dflyway.url=jdbc:mysql://<host>:3306/martial_db \
-Dflyway.user=<user> \
-Dflyway.password=<password> \
-Dflyway.locations=filesystem:src/main/resources/db/migration \
-Dflyway.ignoreMigrationPatterns='*:pending' \
flyway:validate
Expected result: BUILD SUCCESS.
3. First boot sequence
- Start MySQL/Redis/MinIO.
- Start martial-api.
- Flyway applies migrations (V0..latest).
- Confirm schema version and service health.
4. Post-migration verification SQL
-- flyway history
SELECT version, description, success
FROM flyway_schema_history
ORDER BY installed_rank;
-- core BladeX tables
SELECT table_name
FROM information_schema.tables
WHERE table_schema='martial_db' AND table_name LIKE 'blade\\_%'
ORDER BY table_name;
-- compatibility table used by mini module
SELECT table_name
FROM information_schema.tables
WHERE table_schema='martial_db' AND table_name='mt_venue';
5. Rollback note
- Do not rollback by replaying full backup SQL into a running environment.
- Prefer restoring from DB snapshot/backup at infrastructure level.