| @@ 300-310 (lines=11) @@ | ||
| 297 | /** |
|
| 298 | * {@inheritdoc} |
|
| 299 | */ |
|
| 300 | public function hasColumn($tableName, $columnName) |
|
| 301 | { |
|
| 302 | $rows = $this->fetchAll(sprintf('pragma table_info(%s)', $this->quoteTableName($tableName))); |
|
| 303 | foreach ($rows as $column) { |
|
| 304 | if (strcasecmp($column['name'], $columnName) === 0) { |
|
| 305 | return true; |
|
| 306 | } |
|
| 307 | } |
|
| 308 | ||
| 309 | return false; |
|
| 310 | } |
|
| 311 | ||
| 312 | /** |
|
| 313 | * {@inheritdoc} |
|
| @@ 388-398 (lines=11) @@ | ||
| 385 | /** |
|
| 386 | * {@inheritdoc} |
|
| 387 | */ |
|
| 388 | public function hasColumn($tableName, $columnName) |
|
| 389 | { |
|
| 390 | $rows = $this->fetchAll(sprintf('SHOW COLUMNS FROM %s', $this->quoteTableName($tableName))); |
|
| 391 | foreach ($rows as $column) { |
|
| 392 | if (strcasecmp($column['Field'], $columnName) === 0) { |
|
| 393 | return true; |
|
| 394 | } |
|
| 395 | } |
|
| 396 | ||
| 397 | return false; |
|
| 398 | } |
|
| 399 | ||
| 400 | /** |
|
| 401 | * {@inheritdoc} |
|