/** * Load changelog by metadata * * @param null|int $currentVersion * @return array */ public function loadByMetadata($currentVersion = null) { $select = $this->_connection->select()->from(array('changelog' => $this->_metadata->getChangelogName()), array())->where('version_id >= ?', $this->_metadata->getVersionId())->columns(array($this->_metadata->getKeyColumn())); if ($currentVersion) { $select->where('version_id < ?', $currentVersion); } return $this->_connection->fetchCol($select); }