Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

faqinstances.created TIMESTAMP DEFAULT 0 - invalid for MySQL 5.7 #1117

Closed
fisharebest opened this issue Apr 6, 2016 · 2 comments
Closed
Assignees
Milestone

Comments

@fisharebest
Copy link

Since MySQL 5.7, the "zero timestamp" option is disabled by default. See the upgrade notes.

This means that not only are 0 and 0000-00-00 00:00:00 invalid defaults for timestamp columns, but that 1970-01-01 00:00:00 is also invalid.

The earliest possible timestamp is 1970-01-01 00:00:01. See the docs.

Be aware that timestamp fields are adjusted for the current timezone (SHOW VARIABLES LIKE '%time_zone%').
DEFAULT '1970-01-01 00:00:01' will work on a server in UTC, but fail on one in UTC+1.
DEFAULT '1969-12-31 23:00:01' will work on a server in UTC-1, but fail on one in UTC.

@thorsten thorsten self-assigned this Apr 6, 2016
@thorsten
Copy link
Owner

thorsten commented Apr 6, 2016

Thanks for this hint, don't know if I'll fix it in 2.8 or 2.9.

@thorsten thorsten added ready and removed ready labels Apr 7, 2016
@thorsten thorsten added this to the 2.8.27 milestone Apr 7, 2016
@thorsten
Copy link
Owner

thorsten commented Apr 7, 2016

Fixed for 2.8.27 and 2.9.0-RC3.

@thorsten thorsten closed this as completed Apr 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants