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
In my case I have a file to import. So I simply added SET sql_mode = ''; at the beginning of the file and it works!