[support] database schema error - what to do???

Richard Damon Richard at Damon-family.org
Mon Nov 5 17:50:47 UTC 2012


Looking at my install of D7 .16 I see these fields as having a size of 16 (like the schema says), which means that some other module has altered the table schema directly, and then not implemented a hook_schema_alter function to indicate that it has done this. 

The "proper" procedure would be to search through all your installed (or previously installed) modules, to find the one that changed the field and file an issue on that module. If it changes the schema of a module it is supposed to implement hook_schema_alter to indicate this.

You may be able to figure out which module did it by looking at the tables with something like phpMyAdmin and looking for entries longer than 16 characters, the module these are from it the likely culprit. The other option would be to grep your drupal sources for modules that alter these tables.

Of course, another option is to just ignore the error, as it won't really cause a problem.

A third option would be to make a little module that defines hook_schema_alter and fixes these schema entries just to silence the error.

On Nov 4, 2012, at 11:14 PM, Dave Stevens <geek at uniserve.com> wrote:

> Hello All,
> 
> I have a d7.15 site under development. When I run the status report I get 
> this:
> 
> Database schema    Inconsistent
> The Schema comparison report shows:
> 
>    * 25 modules with matching tables
>    * 1 modules with mis-matching tables
> 
> The database schema comparison report provides more details.
> 
> And then the schema report shows three headers, 
> 
> Match(92)
> Mismatch(3)
> Extra(0)
> 
> and under mismatch is
> 
> Search with
> - Search_dataset
> 
> column type - differences on: length, default
> declared: array('description' => 'TODO: please describe this field!', 'type' 
> => 'varchar', 'length' => 16, 'not null' => TRUE)
> actual: array('description' => 'TODO: please describe this field!', 'type' => 
> 'varchar', 'length' => '64', 'not null' => TRUE, 'default' => '')
> 
> - Search_index 
> 
> column type - differences on: length, default
> declared: array('description' => 'TODO: please describe this field!', 'type' 
> => 'varchar', 'length' => 16, 'not null' => TRUE)
> actual: array('description' => 'TODO: please describe this field!', 'type' => 
> 'varchar', 'length' => '64', 'not null' => TRUE, 'default' => '')
> 
> - Search_node_links
> 
> column type - difference on: length
> declared: array('description' => 'TODO: please describe this field!', 'type' 
> => 'varchar', 'length' => 16, 'not null' => TRUE, 'default' => '')
> actual: array('description' => 'TODO: please describe this field!', 'type' => 
> 'varchar', 'length' => '64', 'not null' => TRUE, 'default' => '')
> 
> So, knowing as little as I do, it seems that there is a discrepancy between 
> the length descriptors as 16 vs 64 characters, but I haven't a clue what to do 
> about this or where to report it, if that's the indicated action. All of this 
> is under the compare tab, there's more under the other tabs but I don't know 
> what's relevant. E.g., there are 700-odd fields with no descriptions listed 
> under the "describe" tab.
> 
> I'm much too attached to the parts of the site that DO work to tinker blindly. 
> 
> Advice?
> 
> Dave
> 
> 
> 
> -- 
> Politics is the Entertainment Division of the military industrial complex.
> 
> ~Frank Zappa
> -- 
> [ Drupal support list | http://lists.drupal.org/ ]


More information about the support mailing list