Advertisement
Darksoul__

Untitled

May 5th, 2021
930
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.55 KB | None | 0 0
  1. CREATE TABLE IF NOT EXISTS Messages(
  2.         messageID INT(255) PRIMARY KEY AUTO_INCREMENT NOT NULL,
  3.         date_time TIMESTAMP NOT NULL,
  4.         mess_text VARCHAR(255) NOT NULL,
  5.         source INT(255) NOT NULL,
  6.         destination_user INT(255),
  7.         destination_group INT(255),
  8.         stato ENUM("Sent","Recieved","Read") NOT NULL,
  9.         FOREIGN KEY (source) REFERENCES users(userID),  
  10.         FOREIGN KEY (destination_user) REFERENCES Users(userID),
  11.         FOREIGN KEY (destination_group) REFERENCES Groups(groupID)
  12.     )engine=InnoDB
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement