pilichoumao opened a new pull request, #6210: URL: https://github.com/apache/rocketmq-dashboard/pull/6210
### Which Issue(s) This PR Fixes - Fixes #6209 ### Brief Description Running `upgrade-cloud-vendor.sql` on a database missing the cloud credential table currently creates a VARCHAR primary key and `created_at`/`updated_at`, which the current credential entity cannot query or insert into. Align newly created credential tables with the canonical numeric, auto-increment schema and `gmt_create`/`gmt_modified`; newly added `credential_id` references also use unsigned BIGINT. Add a regression test for the script's actual DDL, including generated IDs, timestamps, credential references, FK compatibility and data preservation when the CREATE TABLE statement is repeated. The script header explicitly states that existing incompatible columns are not converted. This does not supply a general historical-schema migration. ### How Did You Test This Change? - RED before changing SQL: `DemoDataSqlCompatibilityTest` ran 4 tests with 1 failure (missing `gmt_create`). After the fix, all 4 passed. - Official MySQL **8.0.46**, isolated container: execute the complete baseline script and reproduce errors **1054** (missing `gmt_create`) and **1364** (ID has no default). Execute the fixed full script and verify generated IDs, timestamps, BIGINT reference/FK compatibility, repeat execution preserving rows, canonical-schema compatibility and partially upgraded columns. Already-created incompatible tables remain unchanged as documented. - With JDK 21 and official RocketMQ release dependencies in an isolated Maven cache: ```text cd server mvn -B -ntp -Dmaven.repo.local=/tmp/rocketmq-cloud-schema-m2-20261011 -Dspring.profiles.active=dev clean verify Tests run: 3435, Failures: 0, Errors: 0, Skipped: 3 ``` Checkstyle and compilation passed. Full `verify` still fails at `binary-license-gate`: its **164 dependency JAR findings match the same baseline CI exactly**, with no new findings ([baseline Backend Build](https://github.com/apache/rocketmq-dashboard/actions/runs/38031714207/job/114153879553)). The gate was not bypassed. The H2 regression intentionally executes the actual DDL statements, not MySQL PREPARE/EXECUTE guards; full-script validation was performed separately on MySQL. No dependency changes, frontend changes or production data are involved. ### Checklist - [x] One coherent change; unrelated modifications are not bundled in - [x] Commit subject follows Conventional Commits - [x] Regression test added; method name ends in `Test` - [x] No new UI text - [x] Architecture constraints passed with the backend test suite - [x] No new source files - [x] Script header documents the existing-column migration limitation -- 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]
