| @@ 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} |
|
| @@ 487-497 (lines=11) @@ | ||
| 484 | /** |
|
| 485 | * {@inheritdoc} |
|
| 486 | */ |
|
| 487 | public function hasColumn($tableName, $columnName) |
|
| 488 | { |
|
| 489 | $rows = $this->fetchAll(sprintf('pragma table_info(%s)', $this->quoteTableName($tableName))); |
|
| 490 | foreach ($rows as $column) { |
|
| 491 | if (strcasecmp($column['name'], $columnName) === 0) { |
|
| 492 | return true; |
|
| 493 | } |
|
| 494 | } |
|
| 495 | ||
| 496 | return false; |
|
| 497 | } |
|
| 498 | ||
| 499 | /** |
|
| 500 | * {@inheritdoc} |
|