smiley
smiley
DTDrizzle Team
Created by smiley on 5/2/2024 in #help
Cannot migrate/push after adding column to sqlite table
I'm new to Drizzle, so I assume I'm just doing things wrong. I have a sqlite db with a bunch of tables. If I add a single integer column to a table, then try to drizzle-kit push:sqlite I get the following error :
> drizzle-kit push:sqlite

No config path provided, using default path
Reading config file '/home/radh/src/radh/drizzle.config.ts'
drizzle-kit: v0.20.17
drizzle-orm: v0.29.5

TypeError: Cannot read properties of undefined (reading 'columns')
at _moveDataStatements (/home/radh/src/radh-lucia/node_modules/drizzle-kit/bin.cjs:64441:61)
at logSuggestionsAndReturn2 (/home/radh/src/radh-lucia/node_modules/drizzle-kit/bin.cjs:64666:39)
at async Command.<anonymous> (/home/radh/src/radh-lucia/node_modules/drizzle-kit/bin.cjs:66317:11)
> drizzle-kit push:sqlite

No config path provided, using default path
Reading config file '/home/radh/src/radh/drizzle.config.ts'
drizzle-kit: v0.20.17
drizzle-orm: v0.29.5

TypeError: Cannot read properties of undefined (reading 'columns')
at _moveDataStatements (/home/radh/src/radh-lucia/node_modules/drizzle-kit/bin.cjs:64441:61)
at logSuggestionsAndReturn2 (/home/radh/src/radh-lucia/node_modules/drizzle-kit/bin.cjs:64666:39)
at async Command.<anonymous> (/home/radh/src/radh-lucia/node_modules/drizzle-kit/bin.cjs:66317:11)
I would have thought adding a column wouldn't require me to delete my db and start again, so can anyone help me figure out what I'm doing wrong? Thanks in advance for your help!
2 replies