SQL

CREATE TABLE ingredient_food_extras  (
  created_at DATETIME,
  update_at DATETIME,
  id INTEGER NOT NULL,
  key_name VARCHAR,
  value VARCHAR,
  ingredient_food_id CHAR(32),
  PRIMARY KEY (id),
  FOREIGN KEY(ingredient_food_id) REFERENCES ingredient_foods (id)
)

+ Add column

Columns

Column Data type Allow null Primary key Actions
created_at DATETIME Rename | Drop
update_at DATETIME Rename | Drop
id INTEGER Rename | Drop
key_name VARCHAR Rename | Drop
value VARCHAR Rename | Drop
ingredient_food_id CHAR(32) Rename | Drop

Foreign Keys

Column Destination
ingredient_food_id ingredient_foods.id

+ Add index

Indexes

Name Columns Unique SQL Drop?
ix_ingredient_food_extras_created_at created_at SQL
CREATE INDEX ix_ingredient_food_extras_created_at
ON ingredient_food_extras (created_at)
Drop
ix_ingredient_food_extras_ingredient_food_id ingredient_food_id SQL
CREATE INDEX ix_ingredient_food_extras_ingredient_food_id
ON ingredient_food_extras (ingredient_food_id)
Drop