| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | public function up(Schema $schema): void |
||
| 20 | { |
||
| 21 | $connection = $this->connection; |
||
| 22 | |||
| 23 | $constraint = $connection->fetchOne(' |
||
| 24 | SELECT CONSTRAINT_NAME |
||
| 25 | FROM information_schema.KEY_COLUMN_USAGE |
||
| 26 | WHERE TABLE_NAME = "skill_rel_user_comment" |
||
| 27 | AND COLUMN_NAME = "skill_rel_user_id" |
||
| 28 | AND CONSTRAINT_SCHEMA = DATABASE() |
||
| 29 | LIMIT 1 |
||
| 30 | '); |
||
| 31 | |||
| 32 | if ($constraint) { |
||
| 33 | $connection->executeStatement("ALTER TABLE skill_rel_user_comment DROP FOREIGN KEY `$constraint`"); |
||
| 34 | } |
||
| 35 | |||
| 36 | $connection->executeStatement(' |
||
| 37 | ALTER TABLE skill_rel_user_comment |
||
| 46 |