apache / apache/dolphinscheduler

[DSIP-43] Unify index name in Mysql/PG

Open
#16,048 0 comments 0 reactions 0 assignees View on GitHub
DSIP help wanted
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.