postgres - remove non-portability in dbo #450

Closed
wants to merge 1 commit into
from
@@ -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'];
}
}
@@ -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,15 +631,15 @@ 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';
case (strpos($col, 'time') === 0):
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';