When I tried to alter the table it showed the error:
ERROR 1067 (42000): Invalid default value for \'created_at\'
I googled for this error
SET GLOBAL sql_mode = '';
Resolved my problem.