Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Lines | 9 |
Ratio | 100 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
13 | public function up(Schema $schema) : void |
||
14 | { |
||
15 | // this up() migration is auto-generated, please modify it to your needs |
||
16 | $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); |
||
17 | |||
18 | $this->addSql('ALTER TABLE sylius_product_variant_option_value ADD CONSTRAINT FK_76CDAFA1D957CA06 FOREIGN KEY (option_value_id) REFERENCES shop_product_option_value (id) ON DELETE CASCADE'); |
||
19 | $this->addSql('ALTER TABLE shop_product_option_value ADD CONSTRAINT FK_4AC5CB0AA7C41D6F FOREIGN KEY (option_id) REFERENCES shop_product_option (id) ON DELETE CASCADE'); |
||
20 | $this->addSql('ALTER TABLE sylius_product_option_value_translation ADD CONSTRAINT FK_8D4382DC2C2AC5D3 FOREIGN KEY (translatable_id) REFERENCES shop_product_option_value (id) ON DELETE CASCADE'); |
||
21 | } |
||
22 | |||
33 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.