SQL

CREATE TABLE recipe_instructions  (
  created_at DATETIME,
  update_at DATETIME,
  id CHAR(32) NOT NULL,
  recipe_id CHAR(32),
  position INTEGER,
  type VARCHAR,
  title VARCHAR,
  text VARCHAR,
  summary VARCHAR,
  PRIMARY KEY (id),
  FOREIGN KEY(recipe_id) REFERENCES recipes (id)
)

+ Add column

Columns

Column Data type Allow null Primary key Actions
created_at DATETIME Rename | Drop
update_at DATETIME Rename | Drop
id CHAR(32) Rename | Drop
recipe_id CHAR(32) Rename | Drop
position INTEGER Rename | Drop
type VARCHAR Rename | Drop
title VARCHAR Rename | Drop
text VARCHAR Rename | Drop
summary VARCHAR Rename | Drop

Foreign Keys

Column Destination
recipe_id recipes.id

+ Add index

Indexes

Name Columns Unique SQL Drop?
ix_recipe_instructions_created_at created_at SQL
CREATE INDEX ix_recipe_instructions_created_at
ON recipe_instructions (created_at)
Drop
ix_recipe_instructions_position position SQL
CREATE INDEX ix_recipe_instructions_position
ON recipe_instructions (position)
Drop
ix_recipe_instructions_recipe_id recipe_id SQL
CREATE INDEX ix_recipe_instructions_recipe_id
ON recipe_instructions (recipe_id)
Drop
sqlite_autoindex_recipe_instructions_1 id SQL
-- no sql found --
Drop