function history_update_10100

Remove the year 2038 date limitation.

File

core/modules/history/history.install, line 55

Code

function history_update_10100(&$sandbox = NULL) {
    $connection = \Drupal::database();
    if ($connection->schema()
        ->tableExists('history') && $connection->databaseType() != 'sqlite') {
        $new = [
            'description' => 'The Unix timestamp at which the read occurred.',
            'type' => 'int',
            'not null' => TRUE,
            'default' => 0,
            'size' => 'big',
        ];
        $connection->schema()
            ->changeField('history', 'timestamp', 'timestamp', $new);
    }
}

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