mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
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:
parent
32cb416ad7
commit
cf8c1cd93b
1 changed files with 2 additions and 0 deletions
|
@ -206,6 +206,8 @@ class Postgres extends DboSource {
|
||||||
if ($c->type == 'character varying') {
|
if ($c->type == 'character varying') {
|
||||||
$length = null;
|
$length = null;
|
||||||
$type = 'text';
|
$type = 'text';
|
||||||
|
} else if ($c->type == 'uuid') {
|
||||||
|
$length = 36;
|
||||||
} else {
|
} else {
|
||||||
$length = intval($c->oct_length);
|
$length = intval($c->oct_length);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue