|
@@ 508-515 (lines=8) @@
|
| 505 |
|
} |
| 506 |
|
} |
| 507 |
|
|
| 508 |
|
public function columnExists() |
| 509 |
|
{ |
| 510 |
|
foreach ($this->columns as $column) { |
| 511 |
|
list($tableName, $columnName) = explode('.', $column); |
| 512 |
|
$exists = $this->conn->executeQuery("SELECT count(*) AS count FROM information_schema.columns WHERE table_name = '${tableName}' AND column_name = '${columnName}';")->fetch()['count'] == 1; |
| 513 |
|
$this->I->assertTrue($exists, 'カラムがあるはず '.$column); |
| 514 |
|
} |
| 515 |
|
} |
| 516 |
|
|
| 517 |
|
public function columnNotExists() |
| 518 |
|
{ |
|
@@ 517-524 (lines=8) @@
|
| 514 |
|
} |
| 515 |
|
} |
| 516 |
|
|
| 517 |
|
public function columnNotExists() |
| 518 |
|
{ |
| 519 |
|
foreach ($this->columns as $column) { |
| 520 |
|
list($tableName, $columnName) = explode('.', $column); |
| 521 |
|
$exists = $this->conn->executeQuery("SELECT count(*) AS count FROM information_schema.columns WHERE table_name = '${tableName}' AND column_name = '${columnName}';")->fetch()['count'] == 1; |
| 522 |
|
$this->I->assertFalse($exists, 'カラムがないはず '.$column); |
| 523 |
|
} |
| 524 |
|
} |
| 525 |
|
|
| 526 |
|
public function traitExists() |
| 527 |
|
{ |