I was getting all kinds of errors when I tried to use the latest cvs, so I decided to start with a clean slate, unenabled all the modules, deleted the tables and removed the cck items in the system table. On re-enabling I got no errors, but when I try to add a date field I get the following message (note the missing single quotes around the default value in the query itself).

Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '00010101T00:00:00' at line 1 query: content_db_add_column ALTER TABLE node_data_field_my_date ADD COLUMN field_my_date_value varchar(17) NOT NULL default 00010101T00:00:00 in C:\apps\xampp\htdocs\www\home\includes\database.mysql.inc on line 120

Changing the following around line 56 will fix it:

case 'database columns':
      return array(
        'value' => array('type' => 'varchar', 'length' => 17, 'not null' => TRUE, 'default' => '00010101T00:00:00'),
      );

to 

case 'database columns':
      return array(
        'value' => array('type' => 'varchar', 'length' => 17, 'not null' => TRUE, 'default' => "'00010101T00:00:00'"),
      );

Comments

JonBob’s picture

Status: Active » Fixed

I had made this change in the .install but not the .module. Good catch.

Anonymous’s picture

Status: Fixed » Closed (fixed)