Your AI SDK chat table breaks every six months
Open lib/db/schema.ts in Vercel's ai-chatbot template and look at line 42: export const message = pgTable ( " Message_v2 " , { The _v2 is a scar. When ai 5 changed the message shape, migrating the existing table in place was harder than adding a new one beside it, so the template added Message_v2 and Vote_v2 , backfilled, and eventually deleted the originals. The old tables are gone now. The…
The AI SDK chat table breaks every six months. In the open lib/db/schema.ts of Vercel's ai-chatbot template, the Message_v2 table was introduced when the message shape changed during an update. However, migrating the existing table in place proved challenging, leading to the addition of Message_v2 and Vote_v2 tables, with the originals eventually being deleted. The old tables now carry their version numbers permanently in the schema for every new project that forks from the template.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.