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