Commit 6cda1921 authored by Guilherme Blanco's avatar Guilherme Blanco

Merge pull request #247 from hason/columns

Obtain all informations about a column via Column::toArray()
parents b747f0b1 87919000
......@@ -1193,27 +1193,15 @@ abstract class AbstractPlatform
}
}
$columnData = array();
$columnData = $column->toArray();
$columnData['name'] = $column->getQuotedName($this);
$columnData['type'] = $column->getType();
$columnData['length'] = $column->getLength();
$columnData['notnull'] = $column->getNotNull();
$columnData['fixed'] = $column->getFixed();
$columnData['unique'] = false; // TODO: what do we do about this?
$columnData['version'] = $column->hasPlatformOption("version") ? $column->getPlatformOption('version') : false;
$columnData['comment'] = $this->getColumnComment($column);
if (strtolower($columnData['type']) == "string" && $columnData['length'] === null) {
$columnData['length'] = 255;
}
$columnData['unsigned'] = $column->getUnsigned();
$columnData['precision'] = $column->getPrecision();
$columnData['scale'] = $column->getScale();
$columnData['default'] = $column->getDefault();
$columnData['columnDefinition'] = $column->getColumnDefinition();
$columnData['autoincrement'] = $column->getAutoincrement();
$columnData['comment'] = $this->getColumnComment($column);
if (in_array($column->getName(), $options['primary'])) {
$columnData['primary'] = true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment