SQL
CREATE TABLE households_to_tools (
household_id CHAR(32),
tool_id CHAR(32),
FOREIGN KEY(household_id) REFERENCES households (id),
FOREIGN KEY(tool_id) REFERENCES tools (id),
CONSTRAINT household_id_tool_id_key UNIQUE (household_id, tool_id)
)
Columns
| Column | Data type | Allow null | Primary key | Actions |
|---|---|---|---|---|
household_id |
CHAR(32) |
✓ | Rename | Drop | |
tool_id |
CHAR(32) |
✓ | Rename | Drop |
Foreign Keys
| Column | Destination |
|---|---|
tool_id |
tools.id |
household_id |
households.id |
Indexes
| Name | Columns | Unique | SQL | Drop? |
|---|---|---|---|---|
| ix_households_to_tools_household_id |
household_id
|
SQL | Drop | |
| ix_households_to_tools_tool_id |
tool_id
|
SQL | Drop | |
| sqlite_autoindex_households_to_tools_1 |
|
✓ | SQL | Drop |