We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi!
dizzleDB.insert produces the D1_ERROR: NOT NULL constraint failed: recipes.id: SQLITE_CONSTRAINT despite having AUTOINCREMENT.
dizzleDB.insert
D1_ERROR: NOT NULL constraint failed: recipes.id: SQLITE_CONSTRAINT
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);
The text was updated successfully, but these errors were encountered:
Did you run the migrations? What is inside your server/database/migrations directory?
server/database/migrations
Sorry, something went wrong.
No branches or pull requests
Hi!
dizzleDB.insert
produces theD1_ERROR: NOT NULL constraint failed: recipes.id: SQLITE_CONSTRAINT
despite havingAUTOINCREMENT
.Below is the schema:
The text was updated successfully, but these errors were encountered: