btlqql opened a new pull request, #1374: URL: https://github.com/apache/rocketmq-dashboard/pull/1374
## Summary - introduce Flyway-managed MySQL schema migrations for production startup - provide a complete V1 baseline plus an idempotent V2 legacy upgrade for instance/cloud fields, topic/group instance ownership, query-history context, indexes, and all newer Studio tables - baseline pre-Flyway databases at version 0 so existing non-empty `mysql-data` volumes execute every migration - stop relying on `/docker-entrypoint-initdb.d`, which only runs for a brand-new volume - retain the existing H2 development path with Flyway disabled outside the production profile - add a MySQL Testcontainers regression test that starts from a deliberately incomplete legacy schema, migrates it, verifies tables/columns/indexes, and proves a second migration is a no-op ## Root cause Docker's MySQL entrypoint executes initialization SQL only when `/var/lib/mysql` is empty. Upgrading the Studio server did not apply later DDL to an existing volume, so repositories could target tables or columns that had never been created. ## Validation - `JAVA_HOME=/opt/homebrew/opt/openjdk@21/libexec/openjdk.jdk/Contents/Home mvn -DskipTests=false -Dtest=MySqlMigrationIntegrationTest test` - `JAVA_HOME=/opt/homebrew/opt/openjdk@21/libexec/openjdk.jdk/Contents/Home mvn -q -DskipTests=false -Dtest=StudioApplicationTest test` - MySQL 8.0 Docker verification: migrated a five-table legacy schema through V1/V2, verified all five missing columns plus Flyway history, then reran with `Schema is up to date` Fixes #973 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
