false ); $unneededLogTables = array('logger_exception', 'logger_error', 'logger_api_call'); foreach ($unneededLogTables as $table) { $tableName = Common::prefixTable($table); try { $rows = Db::fetchOne("SELECT COUNT(*) FROM $tableName"); if ($rows == 0) { $result["DROP TABLE $tableName"] = false; } } catch (\Exception $ex) { // ignore } } return $result; } public static function update() { // change level column in logger_message table to string & remove other logging tables if empty Updater::updateDatabase(__FILE__, self::getSql()); } }