How to solve Invalid default value for ‘created_at’ while adding new column in database.
[Problem:] While adding new column to the table by alter method, I used this sql code ALTER TABLE investments ADD bank TEXT; ERROR 1067 (42000): Invalid default value for ‘created_at’ But An eeror came thought I tried various data type ERROR 1067 (42000): Invalid default value for ‘created_at’ [solution] The problem in my database is current mode is in the sql_mode SO, in the sql I typed and hit the commend set global sql_mode = ‘ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION’; and it solved the problem.