Skip to content

HCK-18362: fix boolean false in separate column DEFAULT statements - #208

Merged
taras-dubyk merged 1 commit into
developfrom
fix/boolean-default-false-separate-statement
Oct 30, 2026
Merged

taras-dubyk merged 1 commit into
developfrom
fix/boolean-default-false-separate-statement

Conversation

@Sylvie-P

@Sylvie-P Sylvie-P commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Fix assignTemplates so boolean false is not treated as a missing placeholder when generating ALTER COLUMN ... SET DEFAULT scripts.
  • Sub-task of HCK-18361 (Travelers / user report).

Root cause

Separate FE statements use the updateColumnDefaultValue template; substitution went through assignTemplates, which used a truthy check and dropped false (while true, numbers, and inline CREATE were unaffected).

Test plan

  • Local Node check: defaultValue: false → SET DEFAULT false;
  • Forward-engineer a PostgreSQL model with boolean default false and "Column Default Values – In separate statements"
  • Confirm expected ALTER TABLE ... SET DEFAULT false;
  • Smoke-check true, numeric defaults, and inline mode

Cross-plugin

Same assignTemplates falsy check exists in other plugins (YugabyteDB, CockroachDB, Db2, Oracle, etc.); follow-up only where boolean defaults reach that template path.

assignTemplates treated false as missing when substituting template placeholders, which produced empty ALTER COLUMN SET DEFAULT clauses.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sonarqubecloud

Copy link
Copy Markdown

@Sylvie-P Sylvie-P changed the title Fix boolean false in separate column DEFAULT statements HCK-18361: fix boolean false in separate column DEFAULT statements Oct 29, 2026
@Sylvie-P Sylvie-P changed the title HCK-18361: fix boolean false in separate column DEFAULT statements HCK-18362: fix boolean false in separate column DEFAULT statements Oct 29, 2026
@Sylvie-P
Sylvie-P requested a review from taras-dubyk October 29, 2026 17:03
@taras-dubyk
taras-dubyk merged commit 5539b40 into develop Oct 30, 2026
8 checks passed
@taras-dubyk
taras-dubyk deleted the fix/boolean-default-false-separate-statement branch October 30, 2026 08:23
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