public function run()
 {
     $this->getDatabaseManager();
     $this->conn = Doctrine_Manager::connection();
     $convertingCount = 100;
     $imageSize = IMAGE_MAX_FILESIZE * 2 * 1024;
     if (opToolkit::calculateUsableMemorySize()) {
         $convertingCount = (int) (opToolkit::calculateUsableMemorySize() / $imageSize);
     }
     $this->conn->beginTransaction();
     try {
         $this->fixMimeType();
         $this->fixBinary($convertingCount);
         $this->conn->commit();
     } catch (Exception $e) {
         $this->conn->rollback();
         throw $e;
     }
 }