Describe the Bug
🔍 Root Cause Analysis
The bug originates in the transformForWrite function at packages/drizzle/src/transform/write/traverseFields.ts, lines 783-785:
// Current code (buggy):
if (field.type === 'text' && value && typeof value !== 'string') {
formattedValue = JSON.stringify(value)
}
The Problem: This serialization logic only handles field.type === 'text' but completely ignores richText and json field types.
Link to the code that reproduces this issue
packages/drizzle/src/transform/write/traverseFields.ts, lines 783-785
Reproduction Steps
enable versions and localized at the same time on sqlite
Which area(s) are affected? (Select all that apply)
db: d1-sqlite
Environment Info