From 7a81380f7e6629c1f899f94cd0636aa1f037a16d Mon Sep 17 00:00:00 2001 From: dartcafe Date: Wed, 6 May 2026 08:20:45 +0200 Subject: [PATCH 1/2] Add attributes to Option Signed-off-by: dartcafe --- lib/Db/Option.php | 8 ++++++++ lib/Migration/V9/TableSchema.php | 2 ++ 2 files changed, 10 insertions(+) diff --git a/lib/Db/Option.php b/lib/Db/Option.php index 0e17f37d5..968ed88e6 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]], From 0270b00afb5e2adead09bd578406e75b9245e574 Mon Sep 17 00:00:00 2001 From: dartcafe Date: Wed, 6 May 2026 08:26:28 +0200 Subject: [PATCH 2/2] cs-fix Signed-off-by: dartcafe --- lib/Db/Option.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Db/Option.php b/lib/Db/Option.php index 968ed88e6..b7e45a206 100644 --- a/lib/Db/Option.php +++ b/lib/Db/Option.php @@ -36,7 +36,7 @@ * @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)