Update hook_schema for Y2038

Created on 20 May 2021, over 3 years ago
Updated 5 May 2023, over 1 year ago

Problem/Motivation

The time fields defined in hook_schema or pseudo hook_schema (i.e BatchStorage::schemaDefinition()) need to be updated for Y2038. This issue is to fix this in the following:

  • core/modules/forum/forum.install
  • core/lib/Drupal/Core/Batch/BatchStorage.php
  • core/lib/Drupal/Core/Cache/DatabaseBackend.php
  • core/lib/Drupal/Core/Flood/DatabaseBackend.php
  • core/lib/Drupal/Core/Queue/DatabaseQueue.php
  • core/modules/comment/comment.install
  • core/modules/dblog/dblog.install
  • core/modules/history/history.install
  • core/modules/locale/locale.install
  • core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
  • core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php
  • core/modules/migrate/tests/src/Kernel/HighWaterTest.php
  • core/modules/statistics/statistics.install
  • core/modules/system/system.install
  • core/modules/taxonomy/src/TermStorageSchema.php
  • core/modules/tracker/tracker.install
  • core/modules/views/src/Tests/ViewTestData.php
  • core/modules/views/tests/src/Kernel/Handler/FieldDateTest.php

Steps to reproduce

Proposed resolution

Change the size.

We can skip updating the time fields for SQLite, because SQLite uses a more general dynamic type system. The size of the value determines the size that is used on disk. For more info: https://www.sqlite.org/datatype3.html.

Remaining tasks

Patch
Confirm that all the schema s have been fixed here, that none were missed
Review
Commit

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Fixed

Version

10.1 ✨

Component
BaseΒ  β†’

Last updated 5 minutes ago

Created by

πŸ‡³πŸ‡ΏNew Zealand quietone

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024