diff --git a/lib/Db/Option.php b/lib/Db/Option.php index 0e17f37d5..b7e45a206 100644 --- a/lib/Db/Option.php +++ b/lib/Db/Option.php @@ -32,6 +32,11 @@ * @method void setReleased(int $value) * @method int getDeleted() * @method void setDeleted(int $value) + * @method int getCreated() + * @method void setCreated(int $value) + * @method ?string getDescription() + * @method void setDescription(?string $value) + * * * No magic getters, getters are overwritten for special handling of timestamp and option text * @method void setOrder(int $value) @@ -70,6 +75,7 @@ class Option extends EntityWithUser implements JsonSerializable { protected int $pollId = 0; protected string $pollOptionText = ''; protected string $pollOptionHash = ''; + protected ?string $description = ''; protected int $timestamp = 0; protected int $duration = 0; protected int $order = 0; @@ -79,6 +85,7 @@ class Option extends EntityWithUser implements JsonSerializable { protected string $owner = ''; protected int $released = 0; protected int $deleted = 0; + protected int $created = 0; // joined columns protected ?string $userVoteAnswer = ''; @@ -104,6 +111,7 @@ public function __construct() { $this->addType('duration', 'integer'); $this->addType('confirmed', 'integer'); $this->addType('deleted', 'integer'); + $this->addType('created', 'integer'); // joined Attributes $this->addType('optionLimit', 'integer'); diff --git a/lib/Migration/V9/TableSchema.php b/lib/Migration/V9/TableSchema.php index 53c805599..1044edf23 100644 --- a/lib/Migration/V9/TableSchema.php +++ b/lib/Migration/V9/TableSchema.php @@ -272,6 +272,8 @@ abstract class TableSchema { 'owner' => ['type' => Types::STRING, 'options' => ['notnull' => true, 'default' => '', 'length' => 256]], 'released' => ['type' => Types::BIGINT, 'options' => ['notnull' => true, 'default' => 0, 'length' => 20]], 'deleted' => ['type' => Types::BIGINT, 'options' => ['notnull' => true, 'default' => 0, 'length' => 20]], + 'description' => ['type' => Types::TEXT, 'options' => ['notnull' => false, 'default' => null, 'length' => 65535]], + 'created' => ['type' => Types::BIGINT, 'options' => ['notnull' => true, 'default' => 0, 'length' => 20]], ], Vote::TABLE => [ 'id' => ['type' => Types::BIGINT, 'options' => ['autoincrement' => true, 'notnull' => true, 'length' => 20]],