@@ 266-269 (lines=4) @@ | ||
263 | private function deleteField($table, $field) |
|
264 | { |
|
265 | $fields = array_keys(DB::fieldList($table)); |
|
266 | if (!DB::query("SHOW TABLES LIKE '".$table."'")->value()) { |
|
267 | DB::alteration_message("tried to delete $table.$field but TABLE does not exist", "deleted"); |
|
268 | return false; |
|
269 | } |
|
270 | if (!class_exists($table)) { |
|
271 | DB::alteration_message("tried to delete $table.$field but CLASS does not exist", "deleted"); |
|
272 | return false; |
@@ 253-257 (lines=5) @@ | ||
250 | if (count($notCheckedArray)) { |
|
251 | echo "<h3>Did not check the following classes as no fields appear to be required and hence there is no database table.</h3>"; |
|
252 | foreach ($notCheckedArray as $table) { |
|
253 | if (DB::query("SHOW TABLES LIKE '".$table."'")->value()) { |
|
254 | DB::alteration_message($table ." - NOTE: a table exists for this Class, this is an unexpected result", "deleted"); |
|
255 | } else { |
|
256 | DB::alteration_message($table, "created"); |
|
257 | } |
|
258 | } |
|
259 | } |
|
260 | ||
@@ 378-381 (lines=4) @@ | ||
375 | } |
|
376 | } |
|
377 | } |
|
378 | if (!DB::query("SHOW TABLES LIKE '".$table."'")->value()) { |
|
379 | DB::alteration_message("tried to delete $table.$field but TABLE does not exist", "deleted"); |
|
380 | return false; |
|
381 | } |
|
382 | if (!class_exists($table)) { |
|
383 | DB::alteration_message("tried to delete $table.$field but CLASS does not exist", "deleted"); |
|
384 | return false; |