Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
31 | private function columnExists(string $tableName, string $columnName): bool |
||
32 | { |
||
33 | $sm = $this->conn->getSchemaManager(); |
||
34 | $existingColumns = $sm->listTableColumns($tableName); |
||
35 | foreach ($existingColumns as $existingColumn) { |
||
36 | if ($existingColumn->getName() === $columnName) { |
||
37 | return true; |
||
38 | } |
||
39 | } |
||
40 | |||
41 | return false; |
||
42 | } |
||
44 |