Commit ffde5546 authored by zYne's avatar zYne

fixes #104

parent 2b7d2db9
...@@ -110,11 +110,8 @@ class Doctrine_DataDict { ...@@ -110,11 +110,8 @@ class Doctrine_DataDict {
return "I2"; return "I2";
elseif($length < 10) elseif($length < 10)
return "I4"; return "I4";
elseif($length <= 20)
return "I8";
else else
throw new Doctrine_Exception("Too long integer (max length is 20)."); return "I8";
break; break;
default: default:
throw new Doctrine_Exception("Unknown column type $type"); throw new Doctrine_Exception("Unknown column type $type");
......
...@@ -1409,7 +1409,7 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite ...@@ -1409,7 +1409,7 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
* @param mixed $options * @param mixed $options
* @return void * @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); $this->table->setColumn($name, $type, $length, $options);
} }
/** /**
......
...@@ -183,7 +183,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { ...@@ -183,7 +183,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
switch(count($this->primaryKeys)): switch(count($this->primaryKeys)):
case 0: 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->primaryKeys[] = "id";
$this->identifier = "id"; $this->identifier = "id";
$this->identifierType = Doctrine_Identifier::AUTO_INCREMENT; $this->identifierType = Doctrine_Identifier::AUTO_INCREMENT;
...@@ -860,7 +860,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { ...@@ -860,7 +860,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
} }
/** /**
* getTableDescription * getTableDescription
* @return Doctrine_Table_Description * @return array
*/ */
final public function getTableDescription() { final public function getTableDescription() {
return $this->columns; return $this->columns;
......
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