SQL
CREATE TABLE "recipes_to_tags" (
recipe_id CHAR(32),
tag_id CHAR(32),
CONSTRAINT recipe_id_tag_id_key UNIQUE (recipe_id, tag_id),
FOREIGN KEY(recipe_id) REFERENCES recipes (id),
FOREIGN KEY(tag_id) REFERENCES tags (id)
)
Columns
| Column | Data type | Allow null | Primary key | Actions |
|---|---|---|---|---|
recipe_id |
CHAR(32) |
✓ | Rename | Drop | |
tag_id |
CHAR(32) |
✓ | Rename | Drop |
Foreign Keys
| Column | Destination |
|---|---|
tag_id |
tags.id |
recipe_id |
recipes.id |
Indexes
| Name | Columns | Unique | SQL | Drop? |
|---|---|---|---|---|
| ix_recipes_to_tags_recipe_id |
recipe_id
|
SQL | Drop | |
| ix_recipes_to_tags_tag_id |
tag_id
|
SQL | Drop | |
| sqlite_autoindex_recipes_to_tags_1 |
|
✓ | SQL | Drop |