Commit d6fd3e16 authored by zYne's avatar zYne

--no commit message

--no commit message
parent 670b4831
...@@ -368,15 +368,15 @@ class Doctrine_DataDict_Pgsql extends Doctrine_DataDict ...@@ -368,15 +368,15 @@ class Doctrine_DataDict_Pgsql extends Doctrine_DataDict
case 'string': case 'string':
case 'array': case 'array':
case 'object': case 'object':
case 'varchar': case 'varchar':
case 'gzip': case 'gzip':
$length = (isset($field['length']) && $field['length']) ? $field['length'] : null; // TODO: what is the maximum VARCHAR length in pgsql ?
// TODO: $this->conn->options['default_text_field_length']; $length = (isset($field['length']) && $field['length'] && ! ($field['length'] > 1000000)) ? $field['length'] : null;
$fixed = ((isset($field['fixed']) && $field['fixed']) || $field['type'] == 'char') ? true : false; $fixed = ((isset($field['fixed']) && $field['fixed']) || $field['type'] == 'char') ? true : false;
return $fixed ? ($length ? 'CHAR('.$length.')' : 'CHAR('.$this->conn->options['default_text_field_length'].')') return $fixed ? ($length ? 'CHAR(' . $length . ')' : 'CHAR('.$this->conn->options['default_text_field_length'].')')
: ($length ? 'VARCHAR('.$length.')' : 'TEXT'); : ($length ? 'VARCHAR(' .$length . ')' : 'TEXT');
case 'clob': case 'clob':
return 'TEXT'; return 'TEXT';
......
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