Unexpected type mismatch for sqlite integer boolean mode

Hi, you guys added boolean support for sqlite recently (thanks for that!!). It correctly expects
0
and
1
as the values in the db but I've noticed when using a default(0) it throws a ts error (see below). Setting it as a boolean default(false) does not.

I'd expect to set a value in line with the expectation but perhaps my understanding is wrong? Is it a bug?
export const foo = sqliteTable("foo", {
  isFooBar: integer("is_foo_bar", { mode: "boolean" })
    .notNull()
    .default(0) 
          // ^ Argument of type '0' is not assignable to parameter of type 'boolean | SQL<unknown>'.ts(2345)
});
Was this page helpful?