diff --git a/src/Entity/Note.php b/src/Entity/Note.php index 0aca368b64..3a58fcf165 100644 --- a/src/Entity/Note.php +++ b/src/Entity/Note.php @@ -44,9 +44,9 @@ class Note extends Entity // @codeCoverageIgnoreStart private int $id; private int $actor_id; - private string $content_type = 'text/plain'; - private string $content; - private string $rendered; + private ?string $content_type = null; + private ?string $content = null; + private ?string $rendered = null; private ?int $reply_to; private ?bool $is_local; private ?string $source; @@ -312,8 +312,8 @@ class Note extends Entity 'fields' => [ 'id' => ['type' => 'serial', 'not null' => true], 'actor_id' => ['type' => 'int', 'foreign key' => true, 'target' => 'Actor.id', 'multiplicity' => 'one to one', 'not null' => true, 'description' => 'who made the note'], - 'content' => ['type' => 'text', 'not null' => true, 'description' => 'note content'], - 'content_type' => ['type' => 'varchar', 'not null' => true, 'default' => 'text/plain', 'length' => 129, 'description' => 'A note can be written in a multitude of formats such as text/plain, text/markdown, application/x-latex, and text/html'], + 'content' => ['type' => 'text', 'description' => 'note content'], + 'content_type' => ['type' => 'varchar', 'default' => 'text/plain', 'length' => 129, 'description' => 'A note can be written in a multitude of formats such as text/plain, text/markdown, application/x-latex, and text/html'], 'rendered' => ['type' => 'text', 'description' => 'rendered note content, so we can keep the microtags (if not local)'], 'reply_to' => ['type' => 'int', 'foreign key' => true, 'target' => 'Note.id', 'multiplicity' => 'one to one', 'description' => 'note replied to, null if root of a conversation'], 'is_local' => ['type' => 'bool', 'description' => 'was this note generated by a local actor'],