Wanted to update from beta7 to beta12, but was getting sql errors. The update statements in webform_update_8025 are failing in an Drupal 8.2 installation with table prefixes. I had to change the syntax of the update statements because the table prefix was not added.

              $query = \Drupal::database()->update($table_name);
              $query->fields([
                $temp_field_name => 'open'
              ]);
              $query->condition($field_name, 1);
              $query->execute();
              $query = \Drupal::database()->update($table_name);
              $query->fields([
                $temp_field_name => 'closed'
              ]);
              $query->condition($field_name, 1, '<>');
              $query->execute();

and

              $query = \Drupal::database()->update($table_name);
              $query->fields([
                $field_name => $temp_field_name
              ]);
              $query->execute();

Greats from Germany
LeisureLarry

Comments

LeisureLarry created an issue. See original summary.

LeisureLarry’s picture

My last statement is faulty. Possibly should be:

              $query = \Drupal::database()->update($table_name);
              $query->expression($field_name, $temp_field_name);
              $query->execute();
jrockowitz’s picture

Status: Active » Needs review

This is a duplicate issue that is fixed via the patch provided in below comment.

https://www.drupal.org/node/2866957#comment-12042798

jrockowitz’s picture

Status: Needs review » Closed (duplicate)