Skip to content

fix: quote string default values in generated SQL#47

Merged
Mastersam07 merged 1 commit into
devfrom
fix/sql-quote-string-default-values
Mar 16, 2026
Merged

fix: quote string default values in generated SQL#47
Mastersam07 merged 1 commit into
devfrom
fix/sql-quote-string-default-values

Conversation

@Mastersam07
Copy link
Copy Markdown
Contributor

Default values like '{}', '[]', and 'production' were emitted as bare tokens in SQL (DEFAULT {}), causing syntax errors.

Added sqlDefault() helper that wraps non-numeric, non-boolean, non-keyword values in SQL single quotes with proper escaping of embedded quotes.

@Mastersam07 Mastersam07 merged commit ebd3d06 into dev Mar 16, 2026
6 checks passed
@Mastersam07 Mastersam07 deleted the fix/sql-quote-string-default-values branch March 16, 2026 19:02
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/jao/lib/src/migrations/operations.dart 85.71% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

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.

1 participant