addSql('ALTER TABLE subject ADD created_by_id INT DEFAULT NULL'); $this->addSql('ALTER TABLE subject ADD CONSTRAINT FK_FBCE3E7AB03A8386 FOREIGN KEY (created_by_id) REFERENCES "user" (id) NOT DEFERRABLE'); $this->addSql('CREATE INDEX IDX_FBCE3E7AB03A8386 ON subject (created_by_id)'); } public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs $this->addSql('ALTER TABLE subject DROP CONSTRAINT FK_FBCE3E7AB03A8386'); $this->addSql('DROP INDEX IDX_FBCE3E7AB03A8386'); $this->addSql('ALTER TABLE subject DROP created_by_id'); } }