Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #2
LeisureLarry CreditAttribution: LeisureLarry commentedMy last statement is faulty. Possibly should be:
Comment #3
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedThis is a duplicate issue that is fixed via the patch provided in below comment.
https://www.drupal.org/node/2866957#comment-12042798
Comment #4
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedI committed the patch from https://www.drupal.org/node/2866957#comment-12042798