Commit 6e5851b3 authored by Dries's avatar Dries
Browse files

- Patch #338586 by Damien Tournoud: fix undefined function call in...

- Patch #338586 by Damien Tournoud: fix undefined function call in DatabaseSchema_pgsql::addField().
parent c01f85bc
...@@ -247,7 +247,7 @@ public function addField(&$ret, $table, $field, $spec, $new_keys = array()) { ...@@ -247,7 +247,7 @@ public function addField(&$ret, $table, $field, $spec, $new_keys = array()) {
$spec['not null'] = FALSE; $spec['not null'] = FALSE;
} }
$query = 'ALTER TABLE {' . $table . '} ADD COLUMN '; $query = 'ALTER TABLE {' . $table . '} ADD COLUMN ';
$query .= $this->_createFieldSql($field, $this->_processField($spec)); $query .= $this->createFieldSql($field, $this->processField($spec));
$ret[] = update_sql($query); $ret[] = update_sql($query);
if (isset($spec['initial'])) { if (isset($spec['initial'])) {
// All this because update_sql does not support %-placeholders. // All this because update_sql does not support %-placeholders.
...@@ -290,7 +290,7 @@ public function dropField(&$ret, $table, $field) { ...@@ -290,7 +290,7 @@ public function dropField(&$ret, $table, $field) {
* Default value to be set. NULL for 'default NULL'. * Default value to be set. NULL for 'default NULL'.
*/ */
public function fieldSetDefault(&$ret, $table, $field, $default) { public function fieldSetDefault(&$ret, $table, $field, $default) {
if ($default == NULL) { if (is_null($default)) {
$default = 'NULL'; $default = 'NULL';
} }
else { else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment