function comment_update_10100

Remove the year 2038 date limitation.

File

core/modules/comment/comment.install, line 124

Code

function comment_update_10100(&$sandbox = NULL) {
  $connection = \Drupal::database();
  if ($connection->schema()
    ->tableExists('comment_entity_statistics') && $connection->databaseType() != 'sqlite') {
    $new = [
      'type' => 'int',
      'not null' => TRUE,
      'default' => 0,
      'description' => 'The Unix timestamp of the last comment that was posted within this node, from {comment}.changed.',
      'size' => 'big',
    ];
    $connection->schema()
      ->changeField('comment_entity_statistics', 'last_comment_timestamp', 'last_comment_timestamp', $new);
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.