hideConversation TINYINT(1) NOT NULL DEFAULT 0,
isInvisible TINYINT(1) NOT NULL DEFAULT 0,
lastVisitTime INT(10) NOT NULL DEFAULT 0,
+ joinedAt INT(10) NOT NULL DEFAULT 0,
+ leftAt INT(10) NOT NULL DEFAULT 0,
+ lastMessageID INT(10) NULL,
+ leftByOwnChoice TINYINT(1) NOT NULL DEFAULT 1,
UNIQUE KEY (participantID, conversationID),
KEY (participantID, hideConversation)
message MEDIUMTEXT NOT NULL,
time INT(10) NOT NULL DEFAULT 0,
attachments SMALLINT(5) NOT NULL DEFAULT 0,
- enableSmilies TINYINT(1) NOT NULL DEFAULT 1,
enableHtml TINYINT(1) NOT NULL DEFAULT 0,
- enableBBCodes TINYINT(1) NOT NULL DEFAULT 1,
- showSignature TINYINT(1) NOT NULL DEFAULT 1,
ipAddress VARCHAR(39) NOT NULL DEFAULT '',
lastEditTime INT(10) NOT NULL DEFAULT 0,
editCount MEDIUMINT(7) NOT NULL DEFAULT 0,
UNIQUE KEY (labelID, conversationID)
);
+ALTER TABLE wcf1_user_group ADD canBeAddedAsConversationParticipant TINYINT(1) NOT NULL DEFAULT 0;
+
ALTER TABLE wcf1_conversation ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE SET NULL;
ALTER TABLE wcf1_conversation ADD FOREIGN KEY (lastPosterID) REFERENCES wcf1_user (userID) ON DELETE SET NULL;
ALTER TABLE wcf1_conversation ADD FOREIGN KEY (firstMessageID) REFERENCES wcf1_conversation_message (messageID) ON DELETE SET NULL;
ALTER TABLE wcf1_conversation_to_user ADD FOREIGN KEY (conversationID) REFERENCES wcf1_conversation (conversationID) ON DELETE CASCADE;
ALTER TABLE wcf1_conversation_to_user ADD FOREIGN KEY (participantID) REFERENCES wcf1_user (userID) ON DELETE SET NULL;
+ALTER TABLE wcf1_conversation_to_user ADD FOREIGN KEY (lastMessageID) REFERENCES wcf1_conversation_message (messageID) ON DELETE SET NULL;
ALTER TABLE wcf1_conversation_message ADD FOREIGN KEY (conversationID) REFERENCES wcf1_conversation (conversationID) ON DELETE CASCADE;
ALTER TABLE wcf1_conversation_message ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE SET NULL;