refs #723. CommandEntity. Updated 'script' longtext'

feature/actions
Manuel Aranda Rosales 2024-09-24 09:20:03 +02:00
parent 34c2144ffd
commit 1394f3855b
2 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20240924071858 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->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');
}
}

View File

@ -3,6 +3,7 @@
namespace App\Entity; namespace App\Entity;
use App\Repository\CommandRepository; use App\Repository\CommandRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
@ -13,7 +14,7 @@ class Command extends AbstractEntity
use NameableTrait; use NameableTrait;
use ToggleableTrait; use ToggleableTrait;
#[ORM\Column(length: 255)] #[ORM\Column(type: Types::TEXT)]
private ?string $script = null; private ?string $script = null;
#[ORM\Column(length: 255, nullable: true)] #[ORM\Column(length: 255, nullable: true)]