@@ 499-506 (lines=8) @@ | ||
496 | } |
|
497 | } |
|
498 | ||
499 | public function columnExists() |
|
500 | { |
|
501 | foreach ($this->columns as $column) { |
|
502 | list($tableName, $columnName) = explode('.', $column); |
|
503 | $exists = $this->conn->executeQuery("SELECT count(*) AS count FROM information_schema.columns WHERE table_name = '${tableName}' AND column_name = '${columnName}';")->fetch()['count'] == 1; |
|
504 | $this->I->assertTrue($exists, 'カラムがあるはず '.$column); |
|
505 | } |
|
506 | } |
|
507 | ||
508 | public function columnNotExists() |
|
509 | { |
|
@@ 508-515 (lines=8) @@ | ||
505 | } |
|
506 | } |
|
507 | ||
508 | public function columnNotExists() |
|
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->assertFalse($exists, 'カラムがないはず '.$column); |
|
514 | } |
|
515 | } |
|
516 | ||
517 | public function traitExists() |
|
518 | { |