Skip to content

HCK-18634: Do not generate SET DEFAULT when the default value is unchanged - #106

Open
Sylvie-P wants to merge 1 commit into
developfrom
HCK-18634
Open

Sylvie-P wants to merge 1 commit into
developfrom
HCK-18634

Conversation

@Sylvie-P

@Sylvie-P Sylvie-P commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor
Sub-bugHCK-18634 [YugabyteDB][Db2] FE generates a redundant ALTER COLUMN SET DEFAULT for a false default when the column has a comment

## Problem

Same as hackolade/PostgreSQL#210, in this plugin. In defaultValueHelper.js, the filter newDefault !== undefined && (!oldDefault || newDefault !== oldDefault) treats a falsy old default (false, 0, "", null) as missing. An unchanged default is generated again as ALTER COLUMN ... SET DEFAULT, next to the inline default of CREATE TABLE.

Reproduced in Studio before the fix: boolean column, default false, with a comment, inline defaults.

Change

newDefault !== undefined && newDefault !== oldDefault

The PostgreSQL fix is tracked in HCK-18624; this one has its own sub-task so the two can merge separately.

Regression test in Studio, same branch name HCK-18634 (hackolade/studio#6793).

🤖 Generated with Claude Code

…anged

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants