/**
  * Loads a list of thumanils for the specicifies parameters, returns an array of Schedule\Task elements
  *
  * @return array
  */
 public function load()
 {
     $versions = [];
     $data = $this->db->fetchCol("SELECT id FROM " . Migration\Resource::TABLE_NAME . ' ' . $this->getCondition() . $this->getOrder() . $this->getOffsetLimit(), $this->model->getConditionVariables());
     foreach ($data as $id) {
         $migration = new Migration();
         $migration->setId($id);
         $versions[] = $migration;
     }
     $this->model->setMigrations($versions);
     return $versions;
 }
 /**
  * findMigrationByVersion
  *
  * @param Version $version
  *
  * @return false|Migration
  */
 protected function findMigrationByVersion(Version $version)
 {
     return Migration::getById($version->getId());
 }