Breaking: #99937 - Utilize BIGINT database column type for datetime TCA
See forge#99937
Description
The TCA 'type' => 'datetime'
attribute previously created
integer signed
types as per the new auto-creation of table columns,
if not specified differently via ext_
or listed as an exception
(starttime
, endtime
, tstamp
, crdate
).
A datetime
field created without an exception would allow date ranges
from 1901 to 2038. While that allows dates before 1970 (usual birthdays),
sadly this field would "end" in 2038.
Because of this, the exceptions (starttime
, endtime
, tstamp
,
crdate
) already are created as integer unsigned
, which puts them
from 1970 to 2106. Dates before 1970 are not needed, because you will not publish
or create anything in the past, but maybe after 2038.
However, there are many use cases where datetime
TCA fields should have
a much broader time span, or at least past 2038.
Now, all these fields are changed to use the bigint signed
data type.
This allows to define ranges far into the future and past. It uses a few
more bytes within the database, for the benefit of being a unified solution
that can apply to every use case.
Impact
All extensions that previously declared datetime
columns should
remove the column definition from ext_
to utilize the
type bigint signed
. This will allow to store timestamps after
2038 (and before 1970).
A future implementation may change from integer-based columns completely
to a native datetime
database field.
When executing the database compare utility, the column definitions for a few Core fields are changed and their storable range increases.
These fields are now able to hold a timestamp beyond 2038 (and also before 1970):
be_
users. lastlogin fe_
users. lastlogin pages.
last Updated pages.
new Until sys_
redirect. lasthiton index_
config. timer_ next_ indexing tx_
extensionmanager_ domain_ model_ extension. last_ updated sys_
workspace. publish_ time sys_
file_ metadata. content_ creation_ date tt_
content. date