protected function getColumnDefinitionSql(Column $col) { $type = $this->getDatabaseType($col->getType()); $limit = $col->getLimit(); $sql = strtoupper($type['name']); if (array_key_exists('limit', $type)) { $sql .= sprintf('(%u)', $limit === NULL ? $type['limit'] : min($limit, $type['limit'])); } if (!empty($type['unsigned']) || array_key_exists('unsigned', $type) && $col->isUnsigned()) { $sql .= ' UNSIGNED'; } $sql .= $col->isNullable() ? ' NULL' : ' NOT NULL'; if ($col->hasDefault()) { $sql .= $this->getDefaultValueSql($col->getDefault()); } if ($col->isPrimaryKey() && $col->isIdentity()) { $sql .= ' AUTO_INCREMENT'; } return $sql; }