| @@ 373-383 (lines=11) @@ | ||
| 370 | /** |
|
| 371 | * {@inheritdoc} |
|
| 372 | */ |
|
| 373 | public function hasColumn($tableName, $columnName) |
|
| 374 | { |
|
| 375 | $rows = $this->fetchAll(sprintf('SHOW COLUMNS FROM %s', $this->quoteTableName($tableName))); |
|
| 376 | foreach ($rows as $column) { |
|
| 377 | if (strcasecmp($column['Field'], $columnName) === 0) { |
|
| 378 | return true; |
|
| 379 | } |
|
| 380 | } |
|
| 381 | ||
| 382 | return false; |
|
| 383 | } |
|
| 384 | ||
| 385 | /** |
|
| 386 | * {@inheritdoc} |
|
| @@ 320-330 (lines=11) @@ | ||
| 317 | /** |
|
| 318 | * {@inheritdoc} |
|
| 319 | */ |
|
| 320 | public function hasColumn($tableName, $columnName) |
|
| 321 | { |
|
| 322 | $rows = $this->fetchAll(sprintf('pragma table_info(%s)', $this->quoteTableName($tableName))); |
|
| 323 | foreach ($rows as $column) { |
|
| 324 | if (strcasecmp($column['name'], $columnName) === 0) { |
|
| 325 | return true; |
|
| 326 | } |
|
| 327 | } |
|
| 328 | ||
| 329 | return false; |
|
| 330 | } |
|
| 331 | ||
| 332 | /** |
|
| 333 | * {@inheritdoc} |
|