Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

remove non-portability

  • Loading branch information...
commit 0140ce387ff31a4cd78d9cb6007fc59390eead07 1 parent fb3c3e4
@petteyg authored
View
2  lib/Cake/Console/Command/Task/ModelTask.php
@@ -423,8 +423,6 @@ public function fieldValidation($fieldName, $metaData, $primaryKey = 'id') {
$guess = $methods['date'];
} elseif ($metaData['type'] == 'time') {
$guess = $methods['time'];
- } elseif ($metaData['type'] == 'inet') {
- $guess = $methods['ip'];
}
}
View
7 lib/Cake/Model/Datasource/Database/Postgres.php
@@ -77,8 +77,7 @@ class Postgres extends DboSource {
'date' => array('name' => 'date', 'format' => 'Y-m-d', 'formatter' => 'date'),
'binary' => array('name' => 'bytea'),
'boolean' => array('name' => 'boolean'),
- 'number' => array('name' => 'numeric'),
- 'inet' => array('name' => 'inet')
+ 'number' => array('name' => 'numeric')
);
/**
@@ -632,7 +631,7 @@ public function column($real) {
);
switch (true) {
- case (in_array($col, array('date', 'time', 'inet', 'boolean'))):
+ case (in_array($col, array('date', 'time', 'boolean'))):
return $col;
case (strpos($col, 'timestamp') !== false):
return 'datetime';
@@ -640,7 +639,7 @@ public function column($real) {
return 'time';
case (strpos($col, 'int') !== false && $col != 'interval'):
return 'integer';
- case (strpos($col, 'char') !== false || $col == 'uuid'):
+ case (strpos($col, 'char') !== false || $col == 'uuid' || $col == 'inet'):
return 'string';
case (strpos($col, 'text') !== false):
return 'text';
Please sign in to comment.
Something went wrong with that request. Please try again.