Issue with CURRENT_TIMESTAMP bun:sqlite

I have the following table:

export const token = sqliteTable("token", { token: text("token").notNull().primaryKey(), usage_started: integer("usage_started", { mode: "boolean" }) .notNull() .default(false), usage_started_timestamp: integer("usage_started_timestamp", { mode: "timestamp_ms", }), used: integer("used", { mode: "boolean" }).notNull().default(false), used_timestamp: integer("used_timestamp", { mode: "timestamp_ms" }), expiration_timestamp: integer("expiration_timestamp", { mode: "timestamp_ms", }) .notNull() .default(-1), instance_id: integer("instance_id") .notNull() .references(() => instance.id), });

When running
await db.insert(token).values({ token: tokenId, instance_id: instanceId, expiration_timestamp: currentTimestamp + 86400000, });
Was this page helpful?