Frun1na opened a new issue, #4722: URL: https://github.com/apache/rocketmq-dashboard/issues/4722
### Before Creating the Bug Report - [x] I have searched the [open issues](https://github.com/apache/rocketmq-dashboard/issues) and found no similar issue. ### What Happened `deploy/mysql/upgrade-nameserver-name-uk.sql` cannot run against the schema this repository defines. Its duplicate-cleanup join sorts `rmq_nameserver` rows by `created_at`: ```sql DELETE i FROM rmq_nameserver i JOIN rmq_nameserver k ON k.name = i.name AND (k.created_at < i.created_at OR (k.created_at = i.created_at AND k.id < i.id)); ``` `rmq_nameserver` has no `created_at` column. #2317 (2026-08-17) standardised every table on a numeric `id` plus `gmt_create` / `gmt_modified`, and the schema comment it added states `禁止 created_at/updated_at,禁止 VARCHAR UUID 主键。` The script was added in #2510 (2026-08-25) — eight days *after* that change — so it has never worked: ``` $ docker exec -i rocketmq-studio-mysql mysql -uroot -pstudio123 rocketmq < upgrade-nameserver-name-uk.sql ERROR 1054 (42S22) at line 17: Unknown column 'k.created_at' in 'on clause' ``` Because the statement fails, the script never reaches `ALTER TABLE rmq_nameserver ADD UNIQUE KEY uk_nameserver_name (name)`, so the unique constraint it exists to introduce is silently left unapplied on an existing volume. ### Expected Behavior The script should complete and add `uk_nameserver_name`, keeping the earliest row of each duplicate `name` and reporting that the key already exists on a second run. ### Steps to Reproduce 1. Create a MySQL 8 database and apply `server/src/main/resources/db/schema.sql`, or create `rmq_nameserver` as that file defines it. 2. Run `deploy/mysql/upgrade-nameserver-name-uk.sql` against it. 3. Observe `ERROR 1054 (42S22) at line 17: Unknown column 'k.created_at' in 'on clause'`, and that `uk_nameserver_name` is never created. The other `deploy/mysql/upgrade-*.sql` scripts were checked as well. Several reference pre-#2317 names too, but they were all added before #2317, when those names were still correct, so they are out of scope here. ### Environment - RocketMQ Studio `rocketmq-studio` @ `7ce9a682` - MySQL 8 from `deploy/docker-compose.yml` (`rocketmq-studio-mysql`) ### Are You Willing to Submit a Pull Request? Yes — #4721 fixes this. -- 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]
