diff --git a/migrations/Version20231001214111.php b/migrations/Version20231001214111.php index c6114d3..a60925a 100644 --- a/migrations/Version20231001214111.php +++ b/migrations/Version20231001214111.php @@ -21,9 +21,9 @@ public function up(Schema $schema): void { $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration is specific to \'mysql\'. Skipping it is fine.'); - $this->addSql('ALTER TABLE calendarobjects CHANGE calendardata calendardata TEXT DEFAULT NULL'); - $this->addSql('ALTER TABLE cards CHANGE carddata carddata TEXT DEFAULT NULL'); - $this->addSql('ALTER TABLE schedulingobjects CHANGE calendardata calendardata TEXT DEFAULT NULL'); + $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 diff --git a/migrations/Version20231229203515.php b/migrations/Version20231229203515.php index 8e2675c..8e1a653 100644 --- a/migrations/Version20231229203515.php +++ b/migrations/Version20231229203515.php @@ -9,6 +9,8 @@ /** * Scale up to MEDIUMTEXT for calendar and card data https://github.com/tchapi/davis/pull/111#issuecomment-1872295498 + * ⚠️ This does not fail if the column is already a MEDIUM TEXT, which has allowed us to change a previous migration + * without touching this one (see https://github.com/tchapi/davis/issues/128) */ final class Version20231229203515 extends AbstractMigration {