The captcha_points table schema definition does not explicitly state a default value for the form_id column, and schema.module reports that as a schema mis-match:

 * captcha_points
   * column form_id - difference on: default
     declared: array('description' => t('TODO: please describe this field!'), 'type' => 'varchar', 'length' => 128, 'not null' => TRUE)
     actual: array('description' => t('TODO: please describe this field!'), 'type' => 'varchar', 'length' => '128', 'not null' => TRUE, 'default' => '')
#1 captcha-1049482.patch600 bytesjweowu
PASSED: [[SimpleTest]]: [MySQL] 720 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


jweowu’s picture

Status: Active » Needs review
600 bytes
PASSED: [[SimpleTest]]: [MySQL] 720 pass(es). View
soxofaan’s picture

Status: Needs review » Closed (fixed)
soxofaan’s picture

Status: Closed (fixed) » Active

Ok, this is confusing:
now I have another user complaining that the "fix" from #2 is actually a bug: #1056078: no default for colum used as primary key

@jweowu: what version of the schema module are you running? And what database (MySQL/Postrgress)?

I just tried with 6.x-1.7 (MySQL db) and it indeed indicates that #2 introduces a mismatch for me.

jweowu’s picture

MySQL 5.1 on Windows
captcha 6.x-2.3
schema 6.x-1.7

However... We upgraded this site from Drupal 5, so I would hazard a guess that this may actually an issue with the upgrade path not quite converting the Drupal 5 version of the table to what the Drupal 6 schema describes?

Here's the CREATE TABLE statement MySQL generates for the Drupal 5 version of the database:

DROP TABLE IF EXISTS `captcha_points`;
CREATE TABLE `captcha_points` (
  `form_id` varchar(128) NOT NULL DEFAULT '',
  `module` varchar(64) DEFAULT NULL,
  `type` varchar(64) DEFAULT NULL,
  PRIMARY KEY (`form_id`)

captcha.install for Drupal 5 says:

      db_query("CREATE TABLE {captcha_points} (
        form_id varchar(128) NOT NULL,
        module varchar(64) default NULL,
        type varchar(64) default NULL,
        PRIMARY KEY (form_id)
        ) /*!40100 DEFAULT CHARACTER SET utf8 */;"

Maybe it's some MySQL weirdness that's changed between versions of the database? Having a default value for a primary key column certainly sounds strange.

2xe’s picture

MySQL changed with version 5.02, see

dpatte’s picture

I recently installed latest released version of Captcha 2.4 from 2.3. When I started update it reported a schema error, and after continuing with the update it now reports the same schema error as reported on Feb 3rd.

I have been using MySql 5.1.47 for a while.

JoshOrndorff’s picture

I know this is a super old post, but I just noticed I have the same issue.

Captcha 7.x-1.0
Schema 7.x-1.0-rc1
MySQL 5.5.34-log on CentOS

For full disclosure, my site was upgraded from drupal 6, but neither Captcha nor Schema were installed until after the upgrade. The exact complaint I get from Schema is:

column form_id - difference on: default
declared: array('description' => 'TODO: please describe this field!', 'type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => '')
actual: array('description' => 'TODO: please describe this field!', 'type' => 'varchar', 'length' => '128', 'not null' => TRUE)

Also, should we actually describe this field? ;-)

Thanks a lot,