From 1394f3855b66f284f4dd448884182b922e740903 Mon Sep 17 00:00:00 2001 From: Manuel Aranda Date: Tue, 24 Sep 2024 09:20:03 +0200 Subject: [PATCH] refs #723. CommandEntity. Updated 'script' longtext' --- migrations/Version20240924071858.php | 31 ++++++++++++++++++++++++++++ src/Entity/Command.php | 3 ++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 migrations/Version20240924071858.php diff --git a/migrations/Version20240924071858.php b/migrations/Version20240924071858.php new file mode 100644 index 0000000..d758402 --- /dev/null +++ b/migrations/Version20240924071858.php @@ -0,0 +1,31 @@ +addSql('ALTER TABLE command CHANGE script script LONGTEXT NOT NULL'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE command CHANGE script script VARCHAR(255) NOT NULL'); + } +} diff --git a/src/Entity/Command.php b/src/Entity/Command.php index 974730a..f43aa30 100644 --- a/src/Entity/Command.php +++ b/src/Entity/Command.php @@ -3,6 +3,7 @@ namespace App\Entity; use App\Repository\CommandRepository; +use Doctrine\DBAL\Types\Types; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; @@ -13,7 +14,7 @@ class Command extends AbstractEntity use NameableTrait; use ToggleableTrait; - #[ORM\Column(length: 255)] + #[ORM\Column(type: Types::TEXT)] private ?string $script = null; #[ORM\Column(length: 255, nullable: true)]