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