|
|
@@ -599,8 +599,7 @@ class DboPostgres extends DboSource {
|
|
|
$default = isset($col['default']) ? $col['default'] : null;
|
|
|
$nullable = isset($col['null']) ? $col['null'] : null;
|
|
|
unset($col['default'], $col['null']);
|
|
|
- $colList[] = 'ALTER COLUMN '. $fieldName .' TYPE ' . str_replace($fieldName, '', $this->buildColumn($col));
|
|
|
-
|
|
|
+ $colList[] = 'ALTER COLUMN '. $fieldName .' TYPE ' . str_replace(array($fieldName, 'NOT NULL'), '', $this->buildColumn($col));
|
|
|
if (isset($nullable)) {
|
|
|
$nullable = ($nullable) ? 'DROP NOT NULL' : 'SET NOT NULL';
|
|
|
$colList[] = 'ALTER COLUMN '. $fieldName .' ' . $nullable;
|