$fields) { foreach ($fields as $field) { switch ($field['type']) { case 'email': $db_info = content_database_info($field); $table = $db_info['table']; foreach ($db_info['columns'] as $column => $attributes) { $attributes['not null'] = FALSE; $column = $attributes['column']; db_change_field($ret, $table, $column, $column, $attributes); db_field_set_no_default($ret, $table, $column); $ret[] = update_sql("UPDATE {". $table ."} SET ". $column ." = NULL WHERE ". $column ." = ''"); } break; } } } return $ret; }