|
@@ -130,13 +130,11 @@ CREATE TABLE IF NOT EXISTS conversation_participants (
|
|
|
-- Messages table
|
|
-- Messages table
|
|
|
CREATE TABLE IF NOT EXISTS messages (
|
|
CREATE TABLE IF NOT EXISTS messages (
|
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
|
- conversation_id INTEGER NOT NULL,
|
|
|
|
|
sender_id INTEGER NOT NULL,
|
|
sender_id INTEGER NOT NULL,
|
|
|
content TEXT NOT NULL,
|
|
content TEXT NOT NULL,
|
|
|
sent_at DATETIME,
|
|
sent_at DATETIME,
|
|
|
created_at DATETIME,
|
|
created_at DATETIME,
|
|
|
updated_at DATETIME,
|
|
updated_at DATETIME,
|
|
|
- FOREIGN KEY (conversation_id) REFERENCES channels(id),
|
|
|
|
|
FOREIGN KEY (sender_id) REFERENCES users(id)
|
|
FOREIGN KEY (sender_id) REFERENCES users(id)
|
|
|
);
|
|
);
|
|
|
|
|
|