`The types of '_.config.columns' are incompatible between these types` when upgrading to Next 15

driver: turso drizzle-orm: ^0.33.0 Upgraded to Next 15 and now any usage of a table results in errors like this. I have another project where upgrading to Next 15 + Neon Postgres worked fine, so I'm not sure what's going on here. I'm deliberately using 0.33 due to an issue with Turso schema database migrations being broken in anything newer, so upgrading is not really an option (exhibits the same issue anyway). Not sure what Next 15 is doing that could potentially be causing this either, seems to just be a type issue as everything works at runtime. Just wondering if anyone has run into this before. Tried wiping node_modules and lockfile to no avail.
Argument of type 'SQLiteTableWithColumns<{ name: "controls"; schema: undefined; columns: { id: SQLiteColumn<{ name: "id"; tableName: "controls"; dataType: "string"; columnType: "SQLiteText"; data: string; driverParam: string; notNull: true; hasDefault: true; ... 5 more ...; generated: undefined; }, object>; ... 7 more ...; tags: SQLi...' is not assignable to parameter of type 'Table<TableConfig<Column<any, object, object>>>'.
The types of '_.config.columns' are incompatible between these types.
Type '{ id: SQLiteColumn<{ name: "id"; tableName: "controls"; dataType: "string"; columnType: "SQLiteText"; data: string; driverParam: string; notNull: true; hasDefault: true; isPrimaryKey: true; isAutoincrement: false; hasRuntimeDefault: true; enumValues: [...]; baseColumn: never; generated: undefined; }, object>; ... 7 ...' is not assignable to type 'Record<string, Column<any, object, object>>'.
Property 'id' is incompatible with index signature.
Type 'SQLiteColumn<{ name: "id"; tableName: "controls"; dataType: "string"; columnType: "SQLiteText"; data: string; driverParam: string; notNull: true; hasDefault: true; isPrimaryKey: true; isAutoincrement: false; hasRuntimeDefault: true; enumValues: [...]; baseColumn: never; generated: undefined; }, object>' is not assignable to type 'Column<any, object, object>'.
The types of 'table._.config.columns' are incompatible between these types.
Type 'Record<string, SQLiteColumn<any, object>>' is not assignable to type 'Record<string, Column<any, object, object>>'.
'string' index signatures are incompatible.
Type 'SQLiteColumn<any, object>' is not assignable to type 'Column<any, object, object>'.
Property 'config' is protected but type 'Column<T, TRuntimeConfig, TTypeConfig>' is not a class derived from 'Column<T, TRuntimeConfig, TTypeConfig>'.ts(2345)
Argument of type 'SQLiteTableWithColumns<{ name: "controls"; schema: undefined; columns: { id: SQLiteColumn<{ name: "id"; tableName: "controls"; dataType: "string"; columnType: "SQLiteText"; data: string; driverParam: string; notNull: true; hasDefault: true; ... 5 more ...; generated: undefined; }, object>; ... 7 more ...; tags: SQLi...' is not assignable to parameter of type 'Table<TableConfig<Column<any, object, object>>>'.
The types of '_.config.columns' are incompatible between these types.
Type '{ id: SQLiteColumn<{ name: "id"; tableName: "controls"; dataType: "string"; columnType: "SQLiteText"; data: string; driverParam: string; notNull: true; hasDefault: true; isPrimaryKey: true; isAutoincrement: false; hasRuntimeDefault: true; enumValues: [...]; baseColumn: never; generated: undefined; }, object>; ... 7 ...' is not assignable to type 'Record<string, Column<any, object, object>>'.
Property 'id' is incompatible with index signature.
Type 'SQLiteColumn<{ name: "id"; tableName: "controls"; dataType: "string"; columnType: "SQLiteText"; data: string; driverParam: string; notNull: true; hasDefault: true; isPrimaryKey: true; isAutoincrement: false; hasRuntimeDefault: true; enumValues: [...]; baseColumn: never; generated: undefined; }, object>' is not assignable to type 'Column<any, object, object>'.
The types of 'table._.config.columns' are incompatible between these types.
Type 'Record<string, SQLiteColumn<any, object>>' is not assignable to type 'Record<string, Column<any, object, object>>'.
'string' index signatures are incompatible.
Type 'SQLiteColumn<any, object>' is not assignable to type 'Column<any, object, object>'.
Property 'config' is protected but type 'Column<T, TRuntimeConfig, TTypeConfig>' is not a class derived from 'Column<T, TRuntimeConfig, TTypeConfig>'.ts(2345)
export const controls = sqliteTable(
"controls",
{
id: idColumn("control"),
createdAt: createdAtColumn,
templateId: text("template_id")
.notNull()
.references(() => templates.id, {
onDelete: "cascade",
}),
categoryId: text("category_id")
.notNull()
.references(() => categories.id, {
onDelete: "cascade",
}),
order: integer("order").notNull().default(0),
title: text("title").notNull(),
description: text("description", { mode: "json" }).$type<TipTapContent>(),
guidance: text("guidance"),
tags: text("tags", { mode: "json" })
.notNull()
.$type<string[]>()
.default(sql`(json_array())`),
},
(table) => ({
templateIdx: index("controls_template_idx").on(table.templateId),
categoryIdx: index("controls_category_idx").on(table.categoryId),
})
);
export const controls = sqliteTable(
"controls",
{
id: idColumn("control"),
createdAt: createdAtColumn,
templateId: text("template_id")
.notNull()
.references(() => templates.id, {
onDelete: "cascade",
}),
categoryId: text("category_id")
.notNull()
.references(() => categories.id, {
onDelete: "cascade",
}),
order: integer("order").notNull().default(0),
title: text("title").notNull(),
description: text("description", { mode: "json" }).$type<TipTapContent>(),
guidance: text("guidance"),
tags: text("tags", { mode: "json" })
.notNull()
.$type<string[]>()
.default(sql`(json_array())`),
},
(table) => ({
templateIdx: index("controls_template_idx").on(table.templateId),
categoryIdx: index("controls_category_idx").on(table.categoryId),
})
);
3 Replies
Xpecial Poo
Xpecial Poo3mo ago
i got exactly the same issue. no one helped, still waiting :nomore:
Kairu
KairuOP3mo ago
i haven't been able to figure out a solution either.. kinda hoping todays release has something to do with libsql because i have another issue thats seemingly rendered migrations broken for a couple months now @Xpecial Poo do you happen to be in a turborepo monorepo, exporting your schema from a package? locking my drizzle version to exactly 0.33.0 (vs. using ^0.33.0) in all packages doesnt work either so i'm not sure it's a version mismatch ok actually i think i've figured it out. i have a react-email package that was still using react 18.3, so i've updated the deps for that to use the same react 19 rc versions and now typecheck is passing. yet to be seen if react-email actually supports 19 but apparently it does
Xpecial Poo
Xpecial Poo3mo ago
I am using npm workspaces yes. I have tried locking different versions and still nothing. I am actually using this in a node js backend.

Did you find this page helpful?