| @@ 470-480 (lines=11) @@ | ||
| 467 | /** |
|
| 468 | * {@inheritdoc} |
|
| 469 | */ |
|
| 470 | public function hasColumn($tableName, $columnName) |
|
| 471 | { |
|
| 472 | $rows = $this->fetchAll(sprintf('SHOW COLUMNS FROM %s', $this->quoteTableName($tableName))); |
|
| 473 | foreach ($rows as $column) { |
|
| 474 | if (strcasecmp($column['Field'], $columnName) === 0) { |
|
| 475 | return true; |
|
| 476 | } |
|
| 477 | } |
|
| 478 | ||
| 479 | return false; |
|
| 480 | } |
|
| 481 | ||
| 482 | /** |
|
| 483 | * {@inheritdoc} |
|
| @@ 380-390 (lines=11) @@ | ||
| 377 | /** |
|
| 378 | * {@inheritdoc} |
|
| 379 | */ |
|
| 380 | public function hasColumn($tableName, $columnName) |
|
| 381 | { |
|
| 382 | $rows = $this->fetchAll(sprintf('pragma table_info(%s)', $this->quoteTableName($tableName))); |
|
| 383 | foreach ($rows as $column) { |
|
| 384 | if (strcasecmp($column['name'], $columnName) === 0) { |
|
| 385 | return true; |
|
| 386 | } |
|
| 387 | } |
|
| 388 | ||
| 389 | return false; |
|
| 390 | } |
|
| 391 | ||
| 392 | /** |
|
| 393 | * {@inheritdoc} |
|