change method public unsigned to protected _unsigned

This commit is contained in:
imsamurai 2013-11-19 10:55:44 +02:00
parent 1313b81913
commit f817beb8b6

View file

@ -350,7 +350,7 @@ class Mysql extends DboSource {
'length' => $this->length($column->Type) 'length' => $this->length($column->Type)
); );
if (in_array($fields[$column->Field]['type'], $this->fieldParameters['unsigned']['types'], true)) { if (in_array($fields[$column->Field]['type'], $this->fieldParameters['unsigned']['types'], true)) {
$fields[$column->Field]['unsigned'] = $this->unsigned($column->Type); $fields[$column->Field]['unsigned'] = $this->_unsigned($column->Type);
} }
if (!empty($column->Key) && isset($this->index[$column->Key])) { if (!empty($column->Key) && isset($this->index[$column->Key])) {
$fields[$column->Field]['key'] = $this->index[$column->Key]; $fields[$column->Field]['key'] = $this->index[$column->Key];
@ -785,16 +785,6 @@ class Mysql extends DboSource {
return 'text'; return 'text';
} }
/**
* Check if column type is unsigned
*
* @param string $real Real database-layer column type (i.e. "varchar(255)")
* @return bool True if column is unsigned, false otherwise
*/
public function unsigned($real) {
return strpos(strtolower($real), 'unsigned') !== false;
}
/** /**
* Gets the schema name * Gets the schema name
* *
@ -813,4 +803,14 @@ class Mysql extends DboSource {
return $this->useNestedTransactions && version_compare($this->getVersion(), '4.1', '>='); return $this->useNestedTransactions && version_compare($this->getVersion(), '4.1', '>=');
} }
/**
* Check if column type is unsigned
*
* @param string $real Real database-layer column type (i.e. "varchar(255)")
* @return bool True if column is unsigned, false otherwise
*/
protected function _unsigned($real) {
return strpos(strtolower($real), 'unsigned') !== false;
}
} }