| @@ 430-440 (lines=11) @@ | ||
| 427 | /** |
|
| 428 | * {@inheritdoc} |
|
| 429 | */ |
|
| 430 | public function hasColumn($tableName, $columnName) |
|
| 431 | { |
|
| 432 | $rows = $this->fetchAll(sprintf('SHOW COLUMNS FROM %s', $this->quoteTableName($tableName))); |
|
| 433 | foreach ($rows as $column) { |
|
| 434 | if (strcasecmp($column['Field'], $columnName) === 0) { |
|
| 435 | return true; |
|
| 436 | } |
|
| 437 | } |
|
| 438 | ||
| 439 | return false; |
|
| 440 | } |
|
| 441 | ||
| 442 | /** |
|
| 443 | * {@inheritdoc} |
|
| @@ 358-368 (lines=11) @@ | ||
| 355 | /** |
|
| 356 | * {@inheritdoc} |
|
| 357 | */ |
|
| 358 | public function hasColumn($tableName, $columnName) |
|
| 359 | { |
|
| 360 | $rows = $this->fetchAll(sprintf('pragma table_info(%s)', $this->quoteTableName($tableName))); |
|
| 361 | foreach ($rows as $column) { |
|
| 362 | if (strcasecmp($column['name'], $columnName) === 0) { |
|
| 363 | return true; |
|
| 364 | } |
|
| 365 | } |
|
| 366 | ||
| 367 | return false; |
|
| 368 | } |
|
| 369 | ||
| 370 | /** |
|
| 371 | * {@inheritdoc} |
|