From 42c23e4b2875f26b50113eeab31379d732656b1f Mon Sep 17 00:00:00 2001 From: Annemerel Bobbaers Date: Sun, 1 Oct 2023 20:13:07 +0000 Subject: [PATCH] message >255 characters --- migrations/Version20231001200517.php | 33 +++++++++++++++++++ .../Entity/Session/Message/Translation.php | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 migrations/Version20231001200517.php diff --git a/migrations/Version20231001200517.php b/migrations/Version20231001200517.php new file mode 100644 index 0000000000..c260d0de09 --- /dev/null +++ b/migrations/Version20231001200517.php @@ -0,0 +1,33 @@ +abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); + + $this->addSql('ALTER TABLE shop_sessions_messages_translations ALTER content TYPE TEXT'); + $this->addSql('ALTER TABLE shop_sessions_messages_translations ALTER content DROP DEFAULT'); + } + + /** + * @param \Doctrine\DBAL\Schema\Schema $schema + * @return void + */ + public function down(Schema $schema) : void + { + $this->throwIrreversibleMigrationException(); + } +} diff --git a/module/ShopBundle/Entity/Session/Message/Translation.php b/module/ShopBundle/Entity/Session/Message/Translation.php index b9a86da142..374e86a189 100644 --- a/module/ShopBundle/Entity/Session/Message/Translation.php +++ b/module/ShopBundle/Entity/Session/Message/Translation.php @@ -42,7 +42,7 @@ class Translation /** * @var string The content of this translation * - * @ORM\Column(type="string") + * @ORM\Column(type="text") */ private $content;