Skip to content

[Fix-17979][DAO] Fix INT/BIGINT mismatch of workflow_definition_code in t_ds_serial_command.#17988

Merged
ruanwenjun merged 5 commits intoapache:devfrom
iampratap7997-dot:fix/column-mismatch
Feb 27, 2026
Merged

[Fix-17979][DAO] Fix INT/BIGINT mismatch of workflow_definition_code in t_ds_serial_command.#17988
ruanwenjun merged 5 commits intoapache:devfrom
iampratap7997-dot:fix/column-mismatch

Conversation

@iampratap7997-dot
Copy link
Contributor

@iampratap7997-dot iampratap7997-dot commented Feb 22, 2026

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.

close #17979

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

Fixes #17979

@iampratap7997-dot
Copy link
Contributor Author

Hi,
@ruanwenjun @SbloodyS
I have closed the previous PR and opened this new one as there were many failed test cases due to a change which was not mentioned in the issue.
So, I am keeping this PR simple and focused on the issue itself.

Thanks,
Divyansh.

@SbloodyS SbloodyS added the bug Something isn't working label Feb 23, 2026
@SbloodyS SbloodyS added this to the 3.4.1 milestone Feb 23, 2026
@ruanwenjun
Copy link
Member

@iampratap7997-dot Please do not create multiple pull requests for the same issue next time.

ALTER COLUMN id SET DEFAULT nextval('t_ds_task_instance_context_id_seq'::regclass);

-- Change column type to BIGint
ALTER TABLE t_ds_serial_command
Copy link
Member

Choose a reason for hiding this comment

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

We don't need to add ddl at postgresql, since the ddl is correct at 3.4.0.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@iampratap7997-dot
Copy link
Contributor Author

@iampratap7997-dot Please do not create multiple pull requests for the same issue next time.

Understood. I’ll avoid creating multiple PRs for the same issue next time.

@ruanwenjun
Copy link
Member

Please delete the new added file.

@iampratap7997-dot
Copy link
Contributor Author

Please delete the new added file.

Done.

@ruanwenjun
Copy link
Member

@iampratap7997-dot The file still exist, you can use mvn spotless:apply to check.

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.

LGTM

Copy link
Member

@SbloodyS SbloodyS left a comment

Choose a reason for hiding this comment

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

+1

@sonarqubecloud
Copy link

@ruanwenjun ruanwenjun merged commit 58e60fe into apache:dev Feb 27, 2026
74 of 75 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend bug Something isn't working

Projects

None yet

3 participants