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)]