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!
1 Reply
Lazer_Pope (Vossi / Hendrik)
I haven't used sqLite, but I am sure that it won't require you to delete your db. 'No config path provided, using default path Reading config file' sounds like drizzle can't finde your drizzle configuration. I would double check all my drizzle related file paths. If it worked before, check if you changed anything in your file and directory strucutre. I had something like that when I tydied up my project and moved my db migrations into a different folder. '/home/radh/src/radh/drizzle.config.ts' Are you 100% sure that the path is correct?
Want results from more Discord servers?
Add your server