| @@ 360-370 (lines=11) @@ | ||
| 357 | /** |
|
| 358 | * {@inheritdoc} |
|
| 359 | */ |
|
| 360 | public function hasColumn($tableName, $columnName) |
|
| 361 | { |
|
| 362 | $rows = $this->fetchAll(sprintf('pragma table_info(%s)', $this->quoteTableName($tableName))); |
|
| 363 | foreach ($rows as $column) { |
|
| 364 | if (strcasecmp($column['name'], $columnName) === 0) { |
|
| 365 | return true; |
|
| 366 | } |
|
| 367 | } |
|
| 368 | ||
| 369 | return false; |
|
| 370 | } |
|
| 371 | ||
| 372 | /** |
|
| 373 | * {@inheritdoc} |
|
| @@ 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} |
|