SQL
CREATE TABLE human_notification_stats (
id INTEGER PRIMARY KEY AUTOINCREMENT,
chatbot_id INTEGER NOT NULL,
user_id INTEGER NOT NULL,
notification_id INTEGER NOT NULL,
notification_method TEXT NOT NULL,
created_at TEXT NOT NULL,
FOREIGN KEY (chatbot_id) REFERENCES chatbots(id) ON DELETE CASCADE,
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
FOREIGN KEY (notification_id) REFERENCES notifications(id) ON DELETE CASCADE
)
Columns
| Column | Data type | Allow null | Primary key | Actions |
|---|---|---|---|---|
id |
INTEGER |
✓ | ✓ | Rename | Drop |
chatbot_id |
INTEGER |
Rename | Drop | ||
user_id |
INTEGER |
Rename | Drop | ||
notification_id |
INTEGER |
Rename | Drop | ||
notification_method |
TEXT |
Rename | Drop | ||
created_at |
TEXT |
Rename | Drop |
Foreign Keys
| Column | Destination |
|---|---|
notification_id |
notifications.id |
user_id |
users.id |
chatbot_id |
chatbots.id |
Indexes
| Name | Columns | Unique | SQL | Drop? |
|---|---|---|---|---|
| idx_human_notification_stats_chatbot_user |
|
SQL | Drop | |
| idx_human_notification_stats_created_at |
created_at
|
SQL | Drop |