SQL

CREATE TABLE household_preferences  (
  id CHAR(32) NOT NULL,
  household_id CHAR(32) NOT NULL,
  private_household BOOLEAN,
  first_day_of_week INTEGER,
  recipe_public BOOLEAN,
  recipe_show_nutrition BOOLEAN,
  recipe_show_assets BOOLEAN,
  recipe_landscape_view BOOLEAN,
  recipe_disable_comments BOOLEAN,
  recipe_disable_amount BOOLEAN,
  created_at DATETIME,
  update_at DATETIME,
  lock_recipe_edits_from_other_households BOOLEAN,
  PRIMARY KEY (id),
  FOREIGN KEY(household_id) REFERENCES households (id)
)

+ Add column

Columns

Column Data type Allow null Primary key Actions
id CHAR(32) Rename | Drop
household_id CHAR(32) Rename | Drop
private_household BOOLEAN Rename | Drop
first_day_of_week INTEGER Rename | Drop
recipe_public BOOLEAN Rename | Drop
recipe_show_nutrition BOOLEAN Rename | Drop
recipe_show_assets BOOLEAN Rename | Drop
recipe_landscape_view BOOLEAN Rename | Drop
recipe_disable_comments BOOLEAN Rename | Drop
recipe_disable_amount BOOLEAN Rename | Drop
created_at DATETIME Rename | Drop
update_at DATETIME Rename | Drop
lock_recipe_edits_from_other_households BOOLEAN Rename | Drop

Foreign Keys

Column Destination
household_id households.id

+ Add index

Indexes

Name Columns Unique SQL Drop?
ix_household_preferences_created_at created_at SQL
CREATE INDEX ix_household_preferences_created_at
ON household_preferences (created_at)
Drop
ix_household_preferences_household_id household_id SQL
CREATE INDEX ix_household_preferences_household_id
ON household_preferences (household_id)
Drop
sqlite_autoindex_household_preferences_1 id SQL
-- no sql found --
Drop