| @@ 365-375 (lines=11) @@ | ||
| 362 | /** |
|
| 363 | * {@inheritdoc} |
|
| 364 | */ |
|
| 365 | public function hasColumn($tableName, $columnName) |
|
| 366 | { |
|
| 367 | $rows = $this->fetchAll(sprintf('SHOW COLUMNS FROM %s', $this->quoteTableName($tableName))); |
|
| 368 | foreach ($rows as $column) { |
|
| 369 | if (strcasecmp($column['Field'], $columnName) === 0) { |
|
| 370 | return true; |
|
| 371 | } |
|
| 372 | } |
|
| 373 | ||
| 374 | return false; |
|
| 375 | } |
|
| 376 | ||
| 377 | /** |
|
| 378 | * {@inheritdoc} |
|
| @@ 285-295 (lines=11) @@ | ||
| 282 | /** |
|
| 283 | * {@inheritdoc} |
|
| 284 | */ |
|
| 285 | public function hasColumn($tableName, $columnName) |
|
| 286 | { |
|
| 287 | $rows = $this->fetchAll(sprintf('pragma table_info(%s)', $this->quoteTableName($tableName))); |
|
| 288 | foreach ($rows as $column) { |
|
| 289 | if (strcasecmp($column['name'], $columnName) === 0) { |
|
| 290 | return true; |
|
| 291 | } |
|
| 292 | } |
|
| 293 | ||
| 294 | return false; |
|
| 295 | } |
|
| 296 | ||
| 297 | /** |
|
| 298 | * {@inheritdoc} |
|