Пример #1
0
 /**
  * Returns an array of strings which represent version numbers
  * that we *have* migrated
  *
  * @return array
  */
 public function getExecutedMigrations()
 {
     $query_sql = sprintf('SELECT version FROM %s', $this->_adapter->identifier(PHIGRATE_TS_SCHEMA_TBL_NAME));
     $versions = $this->_adapter->selectAll($query_sql);
     $executed = array();
     foreach ($versions as $v) {
         $executed[] = (string) $v['version'];
     }
     sort($executed);
     return $executed;
 }
Пример #2
0
 /**
  * select all
  *
  * @param string $sql Query SQL
  *
  * @return mixed
  */
 public function selectAll($sql)
 {
     return $this->_adapter->selectAll($sql);
 }