|
|
@ -373,6 +373,12 @@ SQL; |
|
|
|
$table->sequenceName = preg_replace(['/nextval/', '/::/', '/regclass/', '/\'\)/', '/\(\'/'], '', $column->defaultValue); |
|
|
|
$table->sequenceName = preg_replace(['/nextval/', '/::/', '/regclass/', '/\'\)/', '/\(\'/'], '', $column->defaultValue); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($column->defaultValue) { |
|
|
|
|
|
|
|
if (preg_match("/^'(.*?)'::/", $column->defaultValue, $matches) || preg_match("/^(.*?)::/", $column->defaultValue, $matches)) { |
|
|
|
|
|
|
|
$column->defaultValue = $matches[1]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
return true; |
|
|
@ -398,7 +404,6 @@ SQL; |
|
|
|
$column->precision = $info['numeric_precision']; |
|
|
|
$column->precision = $info['numeric_precision']; |
|
|
|
$column->scale = $info['numeric_scale']; |
|
|
|
$column->scale = $info['numeric_scale']; |
|
|
|
$column->size = $info['size']; |
|
|
|
$column->size = $info['size']; |
|
|
|
|
|
|
|
|
|
|
|
if (isset($this->typeMap[$column->dbType])) { |
|
|
|
if (isset($this->typeMap[$column->dbType])) { |
|
|
|
$column->type = $this->typeMap[$column->dbType]; |
|
|
|
$column->type = $this->typeMap[$column->dbType]; |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -406,6 +411,7 @@ SQL; |
|
|
|
} |
|
|
|
} |
|
|
|
$column->phpType = $this->getColumnPhpType($column); |
|
|
|
$column->phpType = $this->getColumnPhpType($column); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $column; |
|
|
|
return $column; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|