SQL
CREATE TABLE recipe_share_tokens (
created_at DATETIME,
update_at DATETIME,
id CHAR(32) NOT NULL,
group_id CHAR(32) NOT NULL,
recipe_id CHAR(32) NOT NULL,
expires_at DATETIME NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY(group_id) REFERENCES groups (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 |
CHAR(32) |
✓ | Rename | Drop | |
group_id |
CHAR(32) |
Rename | Drop | ||
recipe_id |
CHAR(32) |
Rename | Drop | ||
expires_at |
DATETIME |
Rename | Drop |
Foreign Keys
| Column | Destination |
|---|---|
recipe_id |
recipes.id |
group_id |
groups.id |
Indexes
| Name | Columns | Unique | SQL | Drop? |
|---|---|---|---|---|
| ix_recipe_share_tokens_created_at |
created_at
|
SQL | Drop | |
| ix_recipe_share_tokens_group_id |
group_id
|
SQL | Drop | |
| ix_recipe_share_tokens_recipe_id |
recipe_id
|
SQL | Drop | |
| sqlite_autoindex_recipe_share_tokens_1 |
id
|
✓ | SQL | Drop |