d-czwq
Last Updated: February 25, 2016
·
1.289K
· drywheattoast

Avoid :timestamp fieldtype in rails migration when using MySQL

Taken from MySQL documentation (applies to versions 5.1, 5.5 and 5.6):

The TIMESTAMP data type is used for values that contain both date and time parts. TIMESTAMP has a range of '1970-01-01 00:00:01' UTC to '2038-01-19 03:14:07' UTC.

Avoid cranial hemorrhaging on Jan 20, 2038 by using :datetime instead.