--- /dev/null
+<?php
+
+/**
+ * Updates the database layout during the update from 5.4 to 5.5.
+ *
+ * @author Matthias Schmidt
+ * @copyright 2001-2021 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package WoltLabSuite\Core
+ */
+
+use wcf\system\database\table\column\DefaultFalseBooleanDatabaseTableColumn;
+use wcf\system\database\table\PartialDatabaseTable;
+
+return [
+ PartialDatabaseTable::create('wcf1_comment')
+ ->columns([
+ DefaultFalseBooleanDatabaseTableColumn::create('hasEmbeddedObjects'),
+ ]),
+ PartialDatabaseTable::create('wcf1_comment_response')
+ ->columns([
+ DefaultFalseBooleanDatabaseTableColumn::create('hasEmbeddedObjects'),
+ ]),
+];
* @property-read string $unfilteredResponseIDs serialized array with the ids of the five latest comment responses, including disabled ones
* @property-read int $enableHtml is 1 if HTML will rendered in the comment, otherwise 0
* @property-read int $isDisabled is 1 if the comment is disabled, otherwise 0
+ * @property-read int $hasEmbeddedObjects is `1` if there are embedded objects in the comment, otherwise `0`
*/
class Comment extends DatabaseObject implements IMessage
{
* @property-read string $message comment response message
* @property-read int $enableHtml is 1 if HTML will rendered in the comment response, otherwise 0
* @property-read int $isDisabled is 1 if the comment response is disabled, otherwise 0
+ * @property-read int $hasEmbeddedObjects is `1` if there are embedded objects in the comment response, otherwise `0`
*/
class CommentResponse extends DatabaseObject implements IMessage
{
unfilteredResponseIDs VARCHAR(255) NOT NULL DEFAULT '',
enableHtml TINYINT(1) NOT NULL DEFAULT 0,
isDisabled TINYINT(1) NOT NULL DEFAULT 0,
+ hasEmbeddedObjects TINYINT(1) NOT NULL DEFAULT 0,
KEY (objectTypeID, objectID, isDisabled, time),
KEY lastCommentTime (userID, time)
message MEDIUMTEXT NOT NULL,
enableHtml TINYINT(1) NOT NULL DEFAULT 0,
isDisabled TINYINT(1) NOT NULL DEFAULT 0,
+ hasEmbeddedObjects TINYINT(1) NOT NULL DEFAULT 0,
KEY (commentID, isDisabled, time),
KEY lastResponseTime (userID, time)