addSql(<<<'SQL' ALTER TABLE monitor ADD parent_id INT DEFAULT NULL SQL); $this->addSql(<<<'SQL' ALTER TABLE monitor ADD CONSTRAINT FK_E1159985727ACA70 FOREIGN KEY (parent_id) REFERENCES monitor (id) SQL); $this->addSql(<<<'SQL' CREATE INDEX IDX_E1159985727ACA70 ON monitor (parent_id) SQL); } public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs $this->addSql(<<<'SQL' ALTER TABLE monitor DROP FOREIGN KEY FK_E1159985727ACA70 SQL); $this->addSql(<<<'SQL' DROP INDEX IDX_E1159985727ACA70 ON monitor SQL); $this->addSql(<<<'SQL' ALTER TABLE monitor DROP parent_id SQL); $this->addSql(<<<'SQL' ALTER TABLE download CHANGE created_at created_at DATETIME DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL SQL); } }