quick syntax fix

This commit is contained in:
Brion Vibber 2010-10-11 13:05:44 -07:00
parent 7f674cc957
commit f85511c28f

View File

@ -303,19 +303,19 @@ class PgsqlSchema extends Schema
$oldType = $this->mapType($old); $oldType = $this->mapType($old);
$newType = $this->mapType($cd); $newType = $this->mapType($cd);
if ($oldType != $newType) { if ($oldType != $newType) {
$phrase[] .= $prefix . 'TYPE ' . $newType; $phrase[] = $prefix . 'TYPE ' . $newType;
} }
if (!empty($old['not null']) && empty($cd['not null'])) { if (!empty($old['not null']) && empty($cd['not null'])) {
$phrase[] .= $prefix . 'DROP NOT NULL'; $phrase[] = $prefix . 'DROP NOT NULL';
} else if (empty($old['not null']) && !empty($cd['not null'])) { } else if (empty($old['not null']) && !empty($cd['not null'])) {
$phrase[] .= $prefix . 'SET NOT NULL'; $phrase[] = $prefix . 'SET NOT NULL';
} }
if (isset($old['default']) && !isset($cd['default'])) { if (isset($old['default']) && !isset($cd['default'])) {
$phrase[] . $prefix . 'DROP DEFAULT'; $phrase[] = $prefix . 'DROP DEFAULT';
} else if (!isset($old['default']) && isset($cd['default'])) { } else if (!isset($old['default']) && isset($cd['default'])) {
$phrase[] . $prefix . 'SET DEFAULT ' . $this->quoteDefaultValue($cd); $phrase[] = $prefix . 'SET DEFAULT ' . $this->quoteDefaultValue($cd);
} }
} }