diff --git a/Doctrine/DataDict.php b/Doctrine/DataDict.php index fb17c1911..14ca006b7 100644 --- a/Doctrine/DataDict.php +++ b/Doctrine/DataDict.php @@ -110,11 +110,8 @@ class Doctrine_DataDict { return "I2"; elseif($length < 10) return "I4"; - elseif($length <= 20) - return "I8"; else - throw new Doctrine_Exception("Too long integer (max length is 20)."); - + return "I8"; break; default: throw new Doctrine_Exception("Unknown column type $type"); diff --git a/Doctrine/Record.php b/Doctrine/Record.php index d9cae3121..652267f4d 100644 --- a/Doctrine/Record.php +++ b/Doctrine/Record.php @@ -1409,7 +1409,7 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite * @param mixed $options * @return void */ - final public function hasColumn($name, $type, $length = 20, $options = "") { + final public function hasColumn($name, $type, $length = 2147483647, $options = "") { $this->table->setColumn($name, $type, $length, $options); } /** diff --git a/Doctrine/Table.php b/Doctrine/Table.php index 0f59bb9d0..90939105e 100644 --- a/Doctrine/Table.php +++ b/Doctrine/Table.php @@ -183,7 +183,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { switch(count($this->primaryKeys)): case 0: - $this->columns = array_merge(array("id" => array("integer",11, array("autoincrement" => true, "primary" => true))), $this->columns); + $this->columns = array_merge(array("id" => array("integer", 20, array("autoincrement" => true, "primary" => true))), $this->columns); $this->primaryKeys[] = "id"; $this->identifier = "id"; $this->identifierType = Doctrine_Identifier::AUTO_INCREMENT; @@ -860,7 +860,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { } /** * getTableDescription - * @return Doctrine_Table_Description + * @return array */ final public function getTableDescription() { return $this->columns;