| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Lines | 12 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function up(Schema $schema): void |
||
| 16 | { |
||
| 17 | // this up() migration is auto-generated, please modify it to your needs |
||
| 18 | $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.'); |
||
| 19 | |||
| 20 | $this->addSql('CREATE INDEX IF NOT EXISTS idx_article_events ON swp_article_events ( |
||
| 21 | article_statistics_id, |
||
| 22 | tenant_code, |
||
| 23 | created_at |
||
| 24 | )'); |
||
| 25 | $this->addSql('ALTER TABLE swp_item ALTER guid TYPE VARCHAR(400)'); |
||
| 26 | } |
||
| 27 | |||
| 37 |
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.