Closed as not planned
Description
Hi!
dizzleDB.insert
produces the
D1_ERROR: NOT NULL constraint failed: recipes.id: SQLITE_CONSTRAINT
despite having AUTOINCREMENT
.
Below is the schema:
import { sqliteTable, text, integer } from 'drizzle-orm/sqlite-core';
const columns = {
id: integer('id').primaryKey({ autoIncrement: true }),
name: text().notNull(),
ingredients: text().notNull(),
steps: text().notNull(),
image: text().notNull(),
notes: text().notNull(),
tags: text(),
user: text().notNull(),
// createdAt: datetime({ mode: 'string' }).notNull(),
};
export const recipes = sqliteTable('recipes', columns);
Metadata
Metadata
Assignees
Labels
No labels