Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE IF NOT EXISTS Messages(
- messageID INT(255) PRIMARY KEY AUTO_INCREMENT NOT NULL,
- date_time TIMESTAMP NOT NULL,
- mess_text VARCHAR(255) NOT NULL,
- source INT(255) NOT NULL,
- destination_user INT(255),
- destination_group INT(255),
- stato ENUM("Sent","Recieved","Read") NOT NULL,
- FOREIGN KEY (source) REFERENCES users(userID),
- FOREIGN KEY (destination_user) REFERENCES Users(userID),
- FOREIGN KEY (destination_group) REFERENCES Groups(groupID)
- )engine=InnoDB
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement