1
0
mirror of synced 2025-01-18 22:41:43 +03:00

default size for columns

This commit is contained in:
zYne 2006-12-23 22:48:16 +00:00
parent cf939c6d3a
commit 4622a71e82

View File

@ -335,7 +335,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
* @param mixed $options * @param mixed $options
* @return void * @return void
*/ */
final public function setColumn($name, $type, $length, $options = array()) { final public function setColumn($name, $type, $length = null, $options = array()) {
if(is_string($options)) if(is_string($options))
$options = explode('|', $options); $options = explode('|', $options);
@ -348,7 +348,11 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
} }
} }
$name = strtolower($name); $name = strtolower($name);
$this->columns[$name] = array($type,$length,$options);
if($length == null)
$length = 2147483647;
$this->columns[$name] = array($type, $length, $options);
if(isset($options['primary'])) { if(isset($options['primary'])) {
$this->primaryKeys[] = $name; $this->primaryKeys[] = $name;