Answer the question
In order to leave comments, you need to log in
How to bypass the error when adding a column to the database?
Hello. I'm trying to add an extra column to the database in a table with stocks. This error pops up: #1067 - Incorrect default value for 'date_start'. What can you think of? OpenServer, if anything
Answer the question
In order to leave comments, you need to log in
In MySQL 5.7 and above, strict date validation is used by default. An empty value or 0000-00-00 is invalid.
You need to set the correct default value, or set the mode to ALLOW_INVALID_DATES .
When you create a new column, you are probably specifying a default value, and you are probably trying to use the value 0 for the date. Although, if the default value is used, it must be set correctly in terms of the Unix epoch (01/01/1970 and younger).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question