From ffde5546f89c9c583b943647f2024f3790ae8a18 Mon Sep 17 00:00:00 2001 From: zYne Date: Sun, 24 Sep 2006 09:52:04 +0000 Subject: [PATCH] fixes #104 --- Doctrine/DataDict.php | 5 +---- Doctrine/Record.php | 2 +- Doctrine/Table.php | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) 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;