import { sqliteTable, text, integer } from 'drizzle-orm/sqlite-core'; export const categories = sqliteTable('categories', { id: integer('id').primaryKey({ autoIncrement: true }), name: text('name').notNull().unique(), }); export const groceries = sqliteTable('groceries', { id: integer('id').primaryKey({ autoIncrement: true }), name: text('name').notNull().unique(), checked: integer('checked', { mode: 'boolean' }).notNull().default(false), createdAt: text('created_at').notNull(), categoryId: integer('category_id').references(() => categories.id), });