| @@ 425-435 (lines=11) @@ | ||
| 422 | /** |
|
| 423 | * {@inheritdoc} |
|
| 424 | */ |
|
| 425 | public function hasColumn($tableName, $columnName) |
|
| 426 | { |
|
| 427 | $rows = $this->fetchAll(sprintf('SHOW COLUMNS FROM %s', $this->quoteTableName($tableName))); |
|
| 428 | foreach ($rows as $column) { |
|
| 429 | if (strcasecmp($column['Field'], $columnName) === 0) { |
|
| 430 | return true; |
|
| 431 | } |
|
| 432 | } |
|
| 433 | ||
| 434 | return false; |
|
| 435 | } |
|
| 436 | ||
| 437 | /** |
|
| 438 | * {@inheritdoc} |
|
| @@ 468-478 (lines=11) @@ | ||
| 465 | /** |
|
| 466 | * {@inheritdoc} |
|
| 467 | */ |
|
| 468 | public function hasColumn($tableName, $columnName) |
|
| 469 | { |
|
| 470 | $rows = $this->fetchAll(sprintf('pragma table_info(%s)', $this->quoteTableName($tableName))); |
|
| 471 | foreach ($rows as $column) { |
|
| 472 | if (strcasecmp($column['name'], $columnName) === 0) { |
|
| 473 | return true; |
|
| 474 | } |
|
| 475 | } |
|
| 476 | ||
| 477 | return false; |
|
| 478 | } |
|
| 479 | ||
| 480 | /** |
|
| 481 | * {@inheritdoc} |
|