Files
fusion/packages
Phil Larson 379d450c38 fix(core): preserve required empty JSON during migration (#2099)
## Summary
- preserve empty and whitespace-only legacy SQLite text as JSON string
scalars when the PostgreSQL target is required `jsonb` without a default
- keep nullable/defaulted JSON behavior unchanged
- canonicalize converted JSON before source/target checksum comparison
- cover empty, whitespace, malformed, and scalar workflow IR values

## Test plan
- `FUSION_PG_TEST_URL_BASE=postgresql://127.0.0.1:55432 nix shell
nixpkgs#postgresql_15 -c bash -c 'corepack pnpm --filter @fusion/core
exec vitest run src/__tests__/postgres/sqlite-migrator.test.ts -t
"preserves empty, whitespace, malformed, and scalar values"
--reporter=dot'`\n- `corepack pnpm --filter @fusion/core typecheck`\n-
`corepack pnpm check:changesets --strict`\n- `corepack pnpm --filter
@runfusion/fusion build`

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Improved SQLite-to-PostgreSQL migrations for required `jsonb` fields.
- Preserves empty, whitespace-only, malformed, and scalar JSON values
instead of replacing them with defaults or `NULL`.
  - Maintains existing `nullable` and default-value behavior.
  - Improved migration verification for converted `jsonb` data.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-14 13:04:40 -07:00
..
2026-07-13 10:32:12 -07:00
2026-07-13 10:32:12 -07:00
2026-07-13 10:32:12 -07:00
2026-07-13 10:32:12 -07:00
2026-07-13 10:32:12 -07:00