Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 10 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
16 | View Code Duplication | public function up(Schema $schema) |
|
|
|||
17 | { |
||
18 | $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.'); |
||
19 | |||
20 | $this->addSql('ALTER TABLE vic_view ADD CONSTRAINT FK_FAA91F341341DB46 FOREIGN KEY (entityProxy_id) REFERENCES vic_entity_proxy_new (id) ON DELETE CASCADE;'); |
||
21 | $this->addSql('ALTER TABLE vic_widget ADD CONSTRAINT FK_57DF2B232B7846BB FOREIGN KEY (related_business_entity_id) REFERENCES vic_business_entity (id) ON DELETE CASCADE;'); |
||
22 | $this->addSql('ALTER TABLE vic_widget ADD CONSTRAINT FK_57DF2B231341DB46 FOREIGN KEY (entityProxy_id) REFERENCES vic_entity_proxy_new (id) ON DELETE CASCADE;'); |
||
23 | $this->addSql('DROP TABLE vic_entity_proxy;'); |
||
24 | $this->addSql('RENAME TABLE vic_entity_proxy_new TO vic_entity_proxy;'); |
||
25 | } |
||
26 | |||
41 |
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.