addSql('CREATE TABLE product_point_controll (id SERIAL NOT NULL, product_id INT NOT NULL, name VARCHAR(255) NOT NULL, PRIMARY KEY(id))'); $this->addSql('CREATE INDEX IDX_9E3C8F8F4584665A ON product_point_controll (product_id)'); $this->addSql('ALTER TABLE product_point_controll ADD CONSTRAINT FK_9E3C8F8F4584665A FOREIGN KEY (product_id) REFERENCES product (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); } public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs $this->addSql('ALTER TABLE product_point_controll DROP FOREIGN KEY FK_9E3C8F8F4584665A'); $this->addSql('DROP TABLE product_point_controll'); } }