I currently have designed a system for simple send message receive message using such simple table. Now I need an extra information that is which message belongs to which conversations. Any ideas tips or guidelines on implementing this kind of system?
CREATE TABLE messages (
ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
FromID INT NOT NULL,
ToID INT NOT NULL,
Deleted BOOLEAN DEFAULT FALSE,
SentDeleted BOOLEAN DEFAULT FALSE,
Subject varchar(255),
Message varchar(255),
DateTime DATETIME
) ENGINE=InnoDB;