Skip to content

[Fix-17979][dao] Fix INT/BIGINT mismatch of workflow_definition_code in t_ds_serial_command.#17983

Open
iampratap7997-dot wants to merge 2 commits intoapache:devfrom
iampratap7997-dot:fix/workflow-definition-code-bigint
Open

[Fix-17979][dao] Fix INT/BIGINT mismatch of workflow_definition_code in t_ds_serial_command.#17983
iampratap7997-dot wants to merge 2 commits intoapache:devfrom
iampratap7997-dot:fix/workflow-definition-code-bigint

Conversation

@iampratap7997-dot
Copy link
Contributor

Purpose of the pull request

This PR fixes a data type mismatch between the MySQL schema and Java entity mapping for t_ds_serial_command.

The column workflow_definition_code was defined as INT(11) in the 3.4.0 MySQL schema, while the corresponding Java field uses Long. This may cause data truncation errors when values exceed the range of INT.

Brief change log

  • Change workflow_definition_code from INT(11) to BIGINT(20) in 3.4.0_schema/mysql
  • Add upgrade SQL in 3.4.1_schema/mysql to modify the existing column to BIGINT(20)
  • Align workflowInstanceId Java type from Integer to Long to match existing DB definition (BIGINT(20))

Verify this pull request

This change is covered by existing tests.

Additionally:

  • Verified schema consistency manually
  • Confirmed no remaining INT(11) definition for workflow_definition_code
  • Ensured upgrade SQL is provided for existing deployments

Pull Request Notice

Pull Request Notice

If your pull request contains incompatible change, you should also add it to docs/docs/en/guide/upgrade/incompatible.md

Copy link
Member

@ruanwenjun ruanwenjun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to make change at

dolphinscheduler_h2.sql
dolphinscheduler_mysql.sql
dolphinscheduler_postgresql.sql

and add ddl at

postgresql/dolphinscheduler_ddl.sql

@iampratap7997-dot iampratap7997-dot force-pushed the fix/workflow-definition-code-bigint branch from 5ac882a to d7eece0 Compare February 18, 2026 15:47
@iampratap7997-dot
Copy link
Contributor Author

Need to make change at

dolphinscheduler_h2.sql
dolphinscheduler_mysql.sql
dolphinscheduler_postgresql.sql

and add ddl at

postgresql/dolphinscheduler_ddl.sql

Addressed the requested changes in H2, MySQL, and PostgreSQL schemas and added the required PostgreSQL upgrade DDL.
Please review again.

Thanks,
Divyansh.

@iampratap7997-dot iampratap7997-dot changed the title [Fix-17979][DAO] Fix INT/BIGINT mismatch of workflow_definition_code in t_ds_serial_command. [Fix-17979][dao] Fix INT/BIGINT mismatch of workflow_definition_code in t_ds_serial_command. Feb 18, 2026
CREATE TABLE IF NOT EXISTS `t_ds_serial_command` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key',
`workflow_definition_code` int(11) NOT NULL COMMENT 'workflow definition code',
`workflow_definition_code` bigint(20) NOT NULL COMMENT 'workflow definition code',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't change the 3.4.0 ddl, since this version has been released, we should alter the column at 3.4.1 ddl.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't change the 3.4.0 ddl, since this version has been released, we should alter the column at 3.4.1 ddl.

Reverted changes in 3.4.0 schema and moved the column modification to 3.4.1 upgrade DDL as suggested.
Please review again.
Thanks.

@iampratap7997-dot iampratap7997-dot force-pushed the fix/workflow-definition-code-bigint branch from d7eece0 to 9c4d7c7 Compare February 19, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments