SQL
CREATE TABLE notifications_log (
id INTEGER PRIMARY KEY AUTOINCREMENT,
event_id TEXT NOT NULL,
notification_hash TEXT NOT NULL,
telegram_chat_id TEXT,
telegram_message_id TEXT,
first_sent_at DATETIME DEFAULT CURRENT_TIMESTAMP
)
+ Add column
Columns
+ Add index
Indexes
| Name |
Columns |
Unique |
SQL |
Drop? |
| idx_notifications_event |
event_id
|
|
SQL
CREATE INDEX idx_notifications_event
ON notifications_log(event_id)
|
Drop
|
| idx_notifications_hash |
notification_hash
first_sent_at
|
|
SQL
CREATE INDEX idx_notifications_hash
ON notifications_log(notification_hash, first_sent_at)
|
Drop
|