addSql(<<<'SQL' ALTER TABLE event_log ADD user_id INT DEFAULT NULL SQL); $this->addSql(<<<'SQL' ALTER TABLE event_log ADD CONSTRAINT FK_9EF0AD16A76ED395 FOREIGN KEY (user_id) REFERENCES user (id) SQL); $this->addSql(<<<'SQL' CREATE INDEX IDX_9EF0AD16A76ED395 ON event_log (user_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 event_log DROP FOREIGN KEY FK_9EF0AD16A76ED395 SQL); $this->addSql(<<<'SQL' DROP INDEX IDX_9EF0AD16A76ED395 ON event_log SQL); $this->addSql(<<<'SQL' ALTER TABLE event_log DROP user_id SQL); } }