TypeError: Cannot read properties of undefined (reading 'columns') - SQLite TursoDB
I've seen this problem mentioned here before, but apparently its still present in the newest version of drizzle. I just updated drizzle kit to 0.22.7 and orm to 0.31.2 (latest versions) and the problem persists. Using turso DB
4 Replies
This is the table I added that causes the problem, I might be missing something but I don't see anything wrong in it. If I remove this table and push again it will correctly apply changes, but I can't push when I add this table. Must be something wrong on this table
Looks like if I push without the foreign keys, it works, and if I add the foreign keys after the table already exists it will work. The problem seems to happen when you create a table with foreign keys from the beggining
Created an issue on github https://github.com/drizzle-team/drizzle-kit-mirror/issues/470
GitHub
[BUG] TypeError: Cannot read properties of undefined (reading 'colu...
After adding the following table : export const discountUses = sqLiteTable( "discountUse", { id: integer("id", { mode: "number" }).primaryKey({ autoIncrement: true }),...
@Genio
ah okay
my current work around it to type everything in schema file
then run db:generate to generate the sql equivalent