MySQL:ERROR 1067 (42000): Invalid default value for ‘end_time’

1. Wrong screenshot

2. Error analysis
The first TIMESTAMP column in the table (if not declared NULL or if the DEFAULT or ON UPDATE clause is displayed) automatically assigns the DEFAULT CURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP properties
The TIMESTAMP column after the first (if it is not declared NULL or the DEFAULT clause is displayed) automatically allocates DEFAULT ‘0000-00-00 00:00:00’ (zero TIMESTAMP), which does not satisfy the NO_ZERO_DATE in SQL_mode and gives an error.
Note: THERE are two types of SQL_mode, one is null value, the other is strict mode, and many default Settings will be given. Strict mode is used by default after MySQL5.7.
NO_ZERO_DATE: If this value is set, the MySQL database does not allow insertion of a zero date, which throws an error rather than a warning.
3. Solutions
First, execute select @@sql_mode, copy the value of the query and delete the NO_ZERO_DATE, then execute set SQL_mode = ‘modified value’.
This method takes effect only in the current session
Select @@glob.sql_mode, copy the value of the query and delete the NO_ZERO_DATE, then execute set global SQL_mode = ‘modified value’.
This method takes effect in the current service and expires after the MySQL service is re-run
Sql_mode = ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,
Then restart mysql.
This method is permanent

Read More: