function tracker_update_10100

Same name and namespace in other branches
  1. 11.x core/modules/tracker/tracker.install \tracker_update_10100()

Remove the year 2038 date limitation.

File

core/modules/tracker/tracker.install, line 125

Code

function tracker_update_10100(&$sandbox = NULL) {
  $connection = \Drupal::database();
  if ($connection->schema()
    ->tableExists('tracker_node') && $connection->databaseType() != 'sqlite') {
    $new = [
      'description' => 'The Unix timestamp when the node was most recently saved or commented on.',
      'type' => 'int',
      'unsigned' => TRUE,
      'not null' => TRUE,
      'default' => 0,
      'size' => 'big',
    ];
    $connection->schema()
      ->changeField('tracker_node', 'changed', 'changed', $new);
  }
  if ($connection->schema()
    ->tableExists('tracker_user') && $connection->databaseType() != 'sqlite') {
    $new = [
      'description' => 'The Unix timestamp when the node was most recently saved or commented on.',
      'type' => 'int',
      'unsigned' => TRUE,
      'not null' => TRUE,
      'default' => 0,
      'size' => 'big',
    ];
    $connection->schema()
      ->changeField('tracker_user', 'changed', 'changed', $new);
  }
}

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