| Conditions | 1 |
| Paths | 1 |
| Total Lines | 22 |
| Lines | 22 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public function up(Schema $schema): void |
||
| 13 | { |
||
| 14 | $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.'); |
||
| 15 | |||
| 16 | $this->addSql('DROP INDEX swp_article_slug_idx'); |
||
| 17 | $this->addSql(' |
||
| 18 | CREATE UNIQUE INDEX swp_article_slug_not_null_deleted_at_idx |
||
| 19 | ON swp_article ( |
||
| 20 | slug, tenant_code, organization_id, |
||
| 21 | deleted_at |
||
| 22 | ) |
||
| 23 | WHERE deleted_at IS NOT NULL |
||
| 24 | '); |
||
| 25 | |||
| 26 | $this->addSql(' |
||
| 27 | CREATE UNIQUE INDEX swp_article_slug_null_deleted_at_idx |
||
| 28 | ON swp_article ( |
||
| 29 | slug, tenant_code, organization_id |
||
| 30 | ) |
||
| 31 | WHERE deleted_at IS NULL |
||
| 32 | '); |
||
| 33 | } |
||
| 34 | |||
| 47 |