Supabase
Releases
Security & compliance
Stability
Column type change may silently truncate data
Part of the Migration & schema safety check · fix arrives as a guide
What it is
A migration alters a column's type without a USING clause specifying how existing values convert.
Why it matters
Postgres either refuses the change or applies a default cast, which can truncate or silently reinterpret every existing row. The migration reports success either way.
How to fix it
Test the cast against a copy of production data, then add an explicit USING clause. Where values cannot convert safely, use expand-contract: add a new column, backfill it, switch reads, and drop the old one later.
Run them all on your app
Connect your repo and your live services with read-only scopes. The first scan is free, and nothing changes without your approval.