addSql('ALTER TABLE page ADD parent_id INT DEFAULT NULL, DROP date_event, DROP date_time_event, DROP message, DROP show_inmenu'); $this->addSql('ALTER TABLE page ADD CONSTRAINT FK_140AB620727ACA70 FOREIGN KEY (parent_id) REFERENCES page (id)'); $this->addSql('CREATE INDEX IDX_140AB620727ACA70 ON page (parent_id)'); } public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs $this->addSql('ALTER TABLE page DROP FOREIGN KEY FK_140AB620727ACA70'); $this->addSql('DROP INDEX IDX_140AB620727ACA70 ON page'); $this->addSql('ALTER TABLE page ADD date_event DATE DEFAULT NULL, ADD date_time_event DATETIME DEFAULT NULL, ADD message LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD show_inmenu TINYINT(1) DEFAULT NULL, DROP parent_id'); } }