Type error when using `drizzle-zod` with sqlite table schema

I'm trying to do this:

const a = createSelectSchema(schema.deckInfo)


My table is:

export const deckInfo = sqliteTable(
    'deck_info',
    {
        id: integer().primaryKey(),
        deckId: text().notNull(),
        name: text().notNull(),
        description: text(),
        ownerUserId: text().notNull(),
        color: integer().notNull(),
        createdAt: integer({ mode: 'timestamp' }).notNull(),
        updatedAt: integer({ mode: 'timestamp' }).notNull(),
        aiAssisted: integer({ mode: 'boolean' }).notNull().default(false) // Whether AI was used at any point in making the deck
    },
    (table) => [check('singleton', sql`${table.id} = 1`)]
)


I get a type error on my input to createSelectSchema.

No overload matches this call.
  The last overload gave the following error.
    Argument of type 'SQLiteTableWithColumns<{ name: "deck_info"; schema: undefined; columns: { id: SQLiteColumn<{ name: "id"; tableName: "deck_info"; dataType: "number"; columnType: "SQLiteInteger"; data: number; driverParam: number; notNull: true; ... 7 more ...; generated: undefined; }, {}, {}>; ... 7 more ...; aiAssisted: SQLiteColum...' is not assignable to parameter of type 'PgEnum<any>'.
      Type 'SQLiteTable<{ name: "deck_info"; schema: undefined; columns: { id: SQLiteColumn<{ name: "id"; tableName: "deck_info"; dataType: "number"; columnType: "SQLiteInteger"; data: number; driverParam: number; notNull: true; ... 7 more ...; generated: undefined; }, {}, {}>; ... 7 more ...; aiAssisted: SQLiteColumn<...>; }; ...' is missing the following properties from type 'PgEnum<any>': enumName, enumValues, schemats(2769)


Is drizzle-zod Postgres only or something?
Was this page helpful?