Commit 32faa02a authored by catch's avatar catch
Browse files

Issue #3370560 by quietone, bogdog400, daffie: Update failed: dblog_update_10101 (TINYINT)

(cherry picked from commit cd9dd266)
parent d82b6480
Loading
Loading
Loading
Loading
Loading
+11 −13
Original line number Diff line number Diff line
@@ -5,8 +5,6 @@
 * Install, update and uninstall functions for the dblog module.
 */

use Drupal\Core\Database\Database;

/**
 * Implements hook_schema().
 */
@@ -123,8 +121,8 @@ function dblog_update_10100(&$sandbox = NULL) {
 * Converts the 'wid' of the 'watchdog' table to a big integer.
 */
function dblog_update_10101(&$sandbox = NULL) {
  $schema = Database::getConnection()->schema();

  $connection = \Drupal::database();
  if ($connection->databaseType() != 'sqlite') {
    // Increase the size of the field.
    $new_specification = [
      'size' => 'big',
@@ -132,6 +130,6 @@ function dblog_update_10101(&$sandbox = NULL) {
      'not null' => TRUE,
      'description' => 'Primary Key: Unique watchdog event ID.',
    ];
  $schema->changeField('watchdog', 'wid', 'wid', $new_specification);

    $connection->schema()->changeField('watchdog', 'wid', 'wid', $new_specification);
  }
}