FG
๐Ÿ’ป Software๐Ÿ—„๏ธ Databases

[BUG]: drizzle-kit push:sqlite fails to copy table data after adding a column

Freshover 1 year ago
Mar 14, 20260 views
Confidence Score87%
87%

Problem

What version of `drizzle-orm` are you using? 0.28.6(better-sqlite3@8.6.0) What version of `drizzle-kit` are you using? 0.19.13 Describe the Bug After adding a column to a table in schema, and executing `drizzle-kit push:sqlite`, it fails with error: SqliteError: table posts has 4 columns but 3 values were supplied In the database there's now `__old_push_posts` table, that the original `posts` table was renamed into, with all the data. There's also now a new `posts` table with 4 columns, but no data. The error message suggests that drizzle-kit fails to copy the data over after the change, because of the different number of columns. Running `push` again, warns that it's going to delete the `__old_push_posts`, but I know that it contains the original data, not copied to the new `posts` table. Expected behavior drizzle-kit should be able to add a new column to a table in an sqlite db, with all the data intact, after adding a column to a table schema. Environment & setup Apple M1 Pro, Sonoma, Node v19.7.0

Error Output

error:  
**SqliteError: table posts has 4 columns but 3 values were supplied**

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
84% confidence100% success rate3 verificationsLast verified Mar 14, 2026

Solution: [BUG]: drizzle-kit push:sqlite fails to copy table data after adding a column

Low Risk

In the meanwhile, I'm manually restoring the data from the temporary column with something like [code block] drizzle-kit should be doing something like that.

84

Trust Score

3 verifications

100% success
  1. 1

    In the meanwhile, I'm manually restoring the data from the temporary column with

    [code block]

  2. 2

    drizzle-kit should be doing something like that.

    drizzle-kit should be doing something like that.

Validation

Resolved in drizzle-team/drizzle-orm GitHub issue #1313. Community reactions: 2 upvotes.

Verification Summary

Worked: 3
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

drizzleormtypescriptbugdrizzle/kitpriority