1
0
mirror of synced 2024-12-13 22:56:04 +03:00
This commit is contained in:
zYne 2006-09-24 09:52:04 +00:00
parent 2b7d2db938
commit ffde5546f8
3 changed files with 4 additions and 7 deletions

View File

@ -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");

View File

@ -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);
}
/**

View File

@ -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;