@@ -219,11 +219,18 @@ |
||
| 219 | 219 | |
| 220 | 220 | } |
| 221 | 221 | |
| 222 | + /** |
|
| 223 | + * @param string $tableName |
|
| 224 | + */ |
|
| 222 | 225 | private function tableExists($tableName) |
| 223 | 226 | { |
| 224 | 227 | return $this->conn->executeQuery("SELECT count(*) AS count FROM information_schema.columns WHERE table_name = '${tableName}';")->fetch()['count'] > 0; |
| 225 | 228 | } |
| 226 | 229 | |
| 230 | + /** |
|
| 231 | + * @param string $tableName |
|
| 232 | + * @param string $columnName |
|
| 233 | + */ |
|
| 227 | 234 | private function columnExists($tableName, $columnName) |
| 228 | 235 | { |
| 229 | 236 | return $this->conn->executeQuery("SELECT count(*) AS count FROM information_schema.columns WHERE table_name = '${tableName}' AND column_name = '${columnName}';")->fetch()['count'] == 1; |