| @@ 368-378 (lines=11) @@ | ||
| 365 | /** |
|
| 366 | * {@inheritdoc} |
|
| 367 | */ |
|
| 368 | public function hasColumn($tableName, $columnName) |
|
| 369 | { |
|
| 370 | $rows = $this->fetchAll(sprintf('SHOW COLUMNS FROM %s', $this->quoteTableName($tableName))); |
|
| 371 | foreach ($rows as $column) { |
|
| 372 | if (strcasecmp($column['Field'], $columnName) === 0) { |
|
| 373 | return true; |
|
| 374 | } |
|
| 375 | } |
|
| 376 | ||
| 377 | return false; |
|
| 378 | } |
|
| 379 | ||
| 380 | /** |
|
| 381 | * {@inheritdoc} |
|
| @@ 302-312 (lines=11) @@ | ||
| 299 | /** |
|
| 300 | * {@inheritdoc} |
|
| 301 | */ |
|
| 302 | public function hasColumn($tableName, $columnName) |
|
| 303 | { |
|
| 304 | $rows = $this->fetchAll(sprintf('pragma table_info(%s)', $this->quoteTableName($tableName))); |
|
| 305 | foreach ($rows as $column) { |
|
| 306 | if (strcasecmp($column['name'], $columnName) === 0) { |
|
| 307 | return true; |
|
| 308 | } |
|
| 309 | } |
|
| 310 | ||
| 311 | return false; |
|
| 312 | } |
|
| 313 | ||
| 314 | /** |
|
| 315 | * {@inheritdoc} |
|