Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/Db/Option.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand All @@ -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 = '';
Expand All @@ -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');
Expand Down
2 changes: 2 additions & 0 deletions lib/Migration/V9/TableSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]],
Expand Down
Loading