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