frederic-huebner opened a new issue, #9011: URL: https://github.com/apache/devlake/issues/9011
## Summary A fresh MySQL installation can fail while applying the SonarQube and domain migrations at version `20260701000000` when the legacy component index is absent. `Dalgorm.DropIndexes` unconditionally calls GORM's `DropIndex`, so MySQL aborts the migration with error 1091 instead of treating the already-absent index as the desired state. ## Reproduction 1. Start a fresh MySQL 8 database. 2. Create the legacy `cq_issue_code_blocks` and `_tool_sonarqube_issue_code_blocks` tables, then remove `idx_cq_issue_code_blocks_component` and `idx__tool_sonarqube_issue_code_blocks_component`. 3. Apply both version `20260701000000` migrations that change `component` to `text`. Actual result: the first migration attempts to drop the absent index and fails with `Error 1091 (42000): Can't DROP 'idx_cq_issue_code_blocks_component'; check that column/key exists`. Expected result: migration is idempotent when an index is already absent, while present indexes continue to be dropped before the column becomes `text`. ## Evidence The targeted regression test `TestSonarqubeIssueCodeBlockLongComponent` reproduces the MySQL 1091 failure before the fix. -- 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]
