function forum_update_10100
Same name in other branches
- 10 core/modules/forum/forum.install \forum_update_10100()
Remove the year 2038 date limitation.
File
-
core/
modules/ forum/ forum.install, line 186
Code
function forum_update_10100(&$sandbox = NULL) {
$connection = \Drupal::database();
if ($connection->schema()
->tableExists('forum_index') && $connection->databaseType() != 'sqlite') {
$new = [
'description' => 'The Unix timestamp when the node was created.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'size' => 'big',
];
$connection->schema()
->changeField('forum_index', 'created', 'created', $new);
$new = [
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => 'The Unix timestamp of the last comment that was posted within this node, from {comment}.timestamp.',
'size' => 'big',
];
$connection->schema()
->changeField('forum_index', '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.