/**
  * If we are going UP then log this version as executed, if going DOWN then delete
  * this version from our set of executed migrations.
  *
  * @param object $version   the version
  * @param object $direction up/down
  *
  * @return string
  */
 public function resolve_current_version($version, $direction)
 {
     if ($direction === 'up') {
         $this->_adapter->set_current_version($version);
     }
     if ($direction === 'down') {
         $this->_adapter->remove_version($version);
     }
     return $version;
 }