CREATE TABLE "cookbooks" (
created_at DATETIME,
update_at DATETIME,
id CHAR(32) NOT NULL,
position INTEGER NOT NULL,
name VARCHAR NOT NULL,
slug VARCHAR NOT NULL,
description VARCHAR,
group_id CHAR(32),
public BOOLEAN,
require_all_categories BOOLEAN,
require_all_tags BOOLEAN,
require_all_tools BOOLEAN,
household_id CHAR(32),
query_filter_string VARCHAR DEFAULT '' NOT NULL,
PRIMARY KEY (id),
CONSTRAINT fk_cookbooks_household_id FOREIGN KEY(household_id) REFERENCES households (id),
CONSTRAINT cookbook_slug_group_id_key UNIQUE (slug, group_id),
FOREIGN KEY(group_id) REFERENCES groups (id)
)