I was trying to add the column of MYSQL Timestamp to the Database Table, the Query seems to be working correctly in mysql console.But when I execute the same in db_query() the following error is thrown.
Failed: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'last_update_date': ALTER TABLE
stores
ADDlast_update_date
TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00';; Array ( ) in store_update_7100() (line 254 of /var/www/slocamo_app/sites/all/modules/store/store.install).
Is the Query.
ALTER TABLE `stores` ADD `last_update_date` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00');