SQL
CREATE TABLE follow_up_classifications (
id INTEGER PRIMARY KEY AUTOINCREMENT,
chatbot_id INTEGER NOT NULL,
conversation_id INTEGER NOT NULL,
should_send INTEGER NOT NULL,
reason TEXT,
classified_at TEXT NOT NULL,
FOREIGN KEY (chatbot_id) REFERENCES chatbots(id) ON DELETE CASCADE,
FOREIGN KEY (conversation_id) REFERENCES conversations(id) ON DELETE CASCADE
)
Columns
| Column | Data type | Allow null | Primary key | Actions |
|---|---|---|---|---|
id |
INTEGER |
✓ | ✓ | Rename | Drop |
chatbot_id |
INTEGER |
Rename | Drop | ||
conversation_id |
INTEGER |
Rename | Drop | ||
should_send |
INTEGER |
Rename | Drop | ||
reason |
TEXT |
✓ | Rename | Drop | |
classified_at |
TEXT |
Rename | Drop |
Foreign Keys
| Column | Destination |
|---|---|
conversation_id |
conversations.id |
chatbot_id |
chatbots.id |
Indexes
| Name | Columns | Unique | SQL | Drop? |
|---|---|---|---|---|
| idx_follow_up_classifications_classified_at |
classified_at
|
SQL | Drop | |
| idx_follow_up_classifications_conversation_classified |
|
SQL | Drop | |
| idx_follow_up_classifications_conversation_id |
conversation_id
|
SQL | Drop |