Return length 36 for uuid columns in Postgres.describe()

When describing a Postgres native "uuid" column, the length 36 should be
returned so that Model.save() will be able to correctly set $isUUID as
"true" on that column.

Fixes #2467
This commit is contained in:
Victor Yap 2012-01-11 17:12:42 -05:00
parent 32cb416ad7
commit cf8c1cd93b

View file

@ -206,6 +206,8 @@ class Postgres extends DboSource {
if ($c->type == 'character varying') {
$length = null;
$type = 'text';
} else if ($c->type == 'uuid') {
$length = 36;
} else {
$length = intval($c->oct_length);
}