SQL
CREATE TABLE notes (
created_at DATETIME,
update_at DATETIME,
id INTEGER NOT NULL,
recipe_id CHAR(32),
title VARCHAR,
text VARCHAR,
PRIMARY KEY (id),
FOREIGN KEY(recipe_id) REFERENCES recipes (id)
)
Columns
| Column | Data type | Allow null | Primary key | Actions |
|---|---|---|---|---|
created_at |
DATETIME |
✓ | Rename | Drop | |
update_at |
DATETIME |
✓ | Rename | Drop | |
id |
INTEGER |
✓ | Rename | Drop | |
recipe_id |
CHAR(32) |
✓ | Rename | Drop | |
title |
VARCHAR |
✓ | Rename | Drop | |
text |
VARCHAR |
✓ | Rename | Drop |
Foreign Keys
| Column | Destination |
|---|---|
recipe_id |
recipes.id |
Indexes
| Name | Columns | Unique | SQL | Drop? |
|---|---|---|---|---|
| ix_notes_created_at |
created_at
|
SQL | Drop | |
| ix_notes_recipe_id |
recipe_id
|
SQL | Drop |