Commit 3abd531f authored by webchick's avatar webchick

#315047 by Josh Waihi: Escape PostgreSQL column names in the changeField function.

parent b0ccdd86
......@@ -547,7 +547,7 @@ public function dropIndex(&$ret, $table, $name) {
* table specification but without the 'fields' element.
*/
public function changeField(&$ret, $table, $field, $field_new, $spec, $new_keys = array()) {
$ret[] = update_sql("ALTER TABLE {" . $table . "} RENAME $field TO " . $field . "_old");
$ret[] = update_sql('ALTER TABLE {' . $table . '} RENAME "' . $field . '" TO "' . $field . '_old"');
$not_null = isset($spec['not null']) ? $spec['not null'] : FALSE;
unset($spec['not null']);
......
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