/** * 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; }
/** * toSql * * @return string */ public function toSql() { $column_sql = sprintf('%s %s', $this->_adapter->identifier($this->name), $this->_sqlType()); $column_sql .= $this->_adapter->addColumnOptions($this->type, $this->_options); return $column_sql; }