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
Run this query:
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00";
it works for me