apache / apache/dolphinscheduler
[DSIP-43] Unify index name in Mysql/PG
- Dominant language
- Java
- Stars
- 14.5k
- Forks
- 5.1k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 28
Description
### Search before asking
- [X] I had searched in the [DSIP](https://github.com/apache/dolphinscheduler/issues/14102) and found no similar DSIP.
### Motivation
Right now, the index name in Mysql/PG might be different, since in PG the index name should be unique in the whole database, but in mysql the index name can only unique in the table.
It's better to unify the index name, this means we need to make the index name unique in the whole database.
### Design Detail
Index name template: idx_{table_name}_{index_name}
### Compatibility, Deprecation, and Migration Plan
Compatibility with the latest version but need to execute DDL.
### Test Plan
Test by IT.
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
Contributor guide
Research direction
Review the database schema and index definitions for both MySQL and PostgreSQL, starting with the existing index names and the differences in their uniqueness rules. Update names to follow the `idx_{table_name}_{index_name}` template and prepare the required DDL migration. Validate the migration and resulting indexes with integration tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, mysql, postgresql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100