Add "timestamp" type for MySQL I used Drupal 7 and the Data module to import a table into Drupal. I could import the orphaned table, but my table has a column of type "timestamp" which does not show up when I try to edit the schema of the data table. I get the following error:


  PDOException: SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'published': ALTER TABLE {resource_profiles} CHANGE published published INT NOT NULL DEFAULT 'CURRENT_TIMESTAMP'; Array ( ) in db_change_field() (line 2988 of C:\xampp\htdocs\drupal\includes\database\database.inc).


I followed http://drupal.org/node/1466122, and added the timestamp datatype to /includes/database/mysql/schema.inc.

Where can I edit the schema information for my data table?
Like Gian says, you can't have a default value of CURRENT_TIMESTAMP for an int field.

Due to Drupal's database abstraction layer timestamp is not a supported field type. 

This is due to not all databases supporting timestamp or now() as a field default value as apposed to mySQL where it is supported. The solution / work around if you're using mySQL is to add a query to your .install that modifies the field default to now() where the field type is int. See the Data Type doc page for further discussion: http://drupal.org/node/159605 or see here for more info on Drupals DB Schema: https://api.drupal.org/comment/48593