fixes #104
This commit is contained in:
parent
2b7d2db938
commit
ffde5546f8
@ -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");
|
||||
|
@ -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);
|
||||
}
|
||||
/**
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user