I am very new to Drupal, and this is the first time posting here.

When I downloaded DP6 module_builder module to module directory in DP6, and refreshed ../admin/module, I got error saying that schema did not match for module_builder_basic.mid that it did not have "not null" though it is primary key (Sorry I don't have the exact message)

Checked the field definition MySQl which looked fine (i.e. it had NOT NULL specified for "mid" field, but module_builder.install did not have the "not null" => TRUE statement. After adding it as below, it worked fine:

function module_builder_schema() {
$schema['module_builder_basic'] = array(
'description' => t('Stores data having to do with modules.'),
'fields' => array(
'mid' => array(
'type' => 'serial',
'description' => t('The id of the module.'),
'not null' => TRUE,
), ...

I have attached the fixed module_builder.install file here

Hope it helps

SN

CommentFileSizeAuthor
module_builder.install.zip708 bytessunad

Comments

sunad’s picture

Priority: Normal » Minor

Changed priority to minor.

clemens.tolboom’s picture

Having the schema module installed I get the error

- module_builder_basic.mid is part of the primary key but is not specified to be 'not null'

The report states:

    *
      module_builder_basic
          o column mid:
            declared: array('type' => 'serial')
            actual: array('type' => 'serial', 'not null' => TRUE, 'disp-width' => '11')
joachim’s picture

Status: Needs review » Fixed

Thanks for the report and the fix.
This is now fixed in CVS.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.