diff --git a/migrations/Version20231229203515.php b/migrations/Version20231229203515.php new file mode 100644 index 0000000..8e2675c --- /dev/null +++ b/migrations/Version20231229203515.php @@ -0,0 +1,37 @@ +skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration is specific to \'mysql\'. Skipping it is fine.'); + + $this->addSql('ALTER TABLE calendarobjects CHANGE calendardata calendardata MEDIUMTEXT DEFAULT NULL'); + $this->addSql('ALTER TABLE cards CHANGE carddata carddata MEDIUMTEXT DEFAULT NULL'); + $this->addSql('ALTER TABLE schedulingobjects CHANGE calendardata calendardata MEDIUMTEXT DEFAULT NULL'); + } + + public function down(Schema $schema): void + { + $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration is specific to \'mysql\'. Skipping it is fine.'); + + $this->addSql('ALTER TABLE schedulingobjects CHANGE calendardata calendardata TEXT DEFAULT NULL'); + $this->addSql('ALTER TABLE calendarobjects CHANGE calendardata calendardata TEXT DEFAULT NULL'); + $this->addSql('ALTER TABLE cards CHANGE carddata carddata TEXT DEFAULT NULL'); + } +} diff --git a/src/Entity/CalendarObject.php b/src/Entity/CalendarObject.php index 693ed8f..a9a65d7 100644 --- a/src/Entity/CalendarObject.php +++ b/src/Entity/CalendarObject.php @@ -21,7 +21,8 @@ class CalendarObject private $id; /** - * @ORM\Column(name="calendardata", type="text", nullable=true, length=65535) + * @ORM\Column(name="calendardata", type="text", nullable=true, length=16777215) + * The length corresponds to MEDIUMTEXT in MySQL */ private $calendarData; diff --git a/src/Entity/Card.php b/src/Entity/Card.php index 0c57e02..b7ba010 100644 --- a/src/Entity/Card.php +++ b/src/Entity/Card.php @@ -28,7 +28,8 @@ class Card private $addressBook; /** - * @ORM\Column(name="carddata", type="text", nullable=true, length=65535) + * @ORM\Column(name="carddata", type="text", nullable=true, length=16777215) + * The length corresponds to MEDIUMTEXT in MySQL */ private $cardData; diff --git a/src/Entity/SchedulingObject.php b/src/Entity/SchedulingObject.php index a98dcb1..a149fe4 100644 --- a/src/Entity/SchedulingObject.php +++ b/src/Entity/SchedulingObject.php @@ -27,7 +27,8 @@ class SchedulingObject private $principalUri; /** - * @ORM\Column(name="calendardata", type="text", nullable=true, length=65535) + * @ORM\Column(name="calendardata", type="text", nullable=true, length=16777215) + * The length corresponds to MEDIUMTEXT in MySQL */ private $calendarData;