How to create timestamp field? I get Undefined index: timestamp:normal in DatabaseSchema_mysql->processField() I am getting the following error for the field within a hook_schema() 


  Notice: Undefined index: timestamp:normal in
  DatabaseSchema_mysql->processField() (line 205 of
  /D7/../includes/database/mysql/schema.inc).


function hook_schema() {  

$schema['abc'] = array(
  'description' =&gt; t('asdc'),
  'fields' =&gt; array(
    'rec_create_date' =&gt; array(
      'type' =&gt; 'timestamp', 
      'not null' =&gt; FALSE, 
      'default' =&gt; NULL,
  ),
 ),
)
}
Looking at DatabaseSchema_mysql::getFieldTypeMap we can see that timestamp itself is not implemented:

$map = array(
    'varchar:normal' =&gt; 'VARCHAR',
    'char:normal' =&gt; 'CHAR',
    'text:tiny' =&gt; 'TINYTEXT',
    'text:small' =&gt; 'TINYTEXT',
    'text:medium' =&gt; 'MEDIUMTEXT',
    'text:big' =&gt; 'LONGTEXT',
    'text:normal' =&gt; 'TEXT',
    'serial:tiny' =&gt; 'TINYINT',
    'serial:small' =&gt; 'SMALLINT',
    'serial:medium' =&gt; 'MEDIUMINT',
    'serial:big' =&gt; 'BIGINT',
    'serial:normal' =&gt; 'INT',
    'int:tiny' =&gt; 'TINYINT',
    'int:small' =&gt; 'SMALLINT',
    'int:medium' =&gt; 'MEDIUMINT',
    'int:big' =&gt; 'BIGINT',
    'int:normal' =&gt; 'INT',
    'float:tiny' =&gt; 'FLOAT',
    'float:small' =&gt; 'FLOAT',
    'float:medium' =&gt; 'FLOAT',
    'float:big' =&gt; 'DOUBLE',
    'float:normal' =&gt; 'FLOAT',
    'numeric:normal' =&gt; 'DECIMAL',
    'blob:big' =&gt; 'LONGBLOB',
    'blob:normal' =&gt; 'BLOB',
  );


So, according to Schema API


  'mysql_type', 'pgsql_type', 'sqlite_type', etc.: If you need to use a record type not included in the officially supported list of types above, you can specify a type for each database backend. In this case, you can leave out the type parameter, but be advised that your schema will fail to load on backends that do not have a type specified. A possible solution can be to use the "text" type as a fallback.


In your specific case "int" makes more sense than "text" as fallback.

Or simply do as core modules, go with "int" for timestamps and calculate everything date-based in PHP code.