Hey guys,

So here's the issue. weight.install had the following update, weight_update_7208(), a couple of releases back;

/**
 * Remove unused id column from weight_settings and add primary key to type.
 */
function weight_update_7208() {
  db_drop_field('weight_settings', 'id');
  db_add_primary_key('weight_settings', array('type'));
}

It removed the 'id' column from the weight_settings table at one point.

The only problem is that the db schema in weight.install still declares that column, for both weight_schema() and weight_schema_7200().

The Schema module therefore declares the following error;

weight_settings

    id: not in database
    primary key:
    declared: array('id')
    actual: array('type')

Here's where it gets weird. I have this error on a couple of installations set-up in 2012, that ran through all the weight updates. The 'id' column was removed, so the error is displayed.

I also have a newer Drupal installation from mid 2013, with the latest weight module release as well. Strange thing is that this installation still has the 'id' column there in the database. I guess this one never hit the weight_update_7208().

So is the 'id' column needed or not? If not, please fix the db schema accordingly.

Comments

theargument’s picture

I have this issue also - on a site upgraded from D6 to D7 - is there any word on whether the ID column is needed?

davisben’s picture

Status: Active » Fixed

The id column is not needed. It has been removed from the schema.

  • davisben committed 2ab8939 on 7.x-2.x
    Issue #2324571 by davisben: Remove unneeded id column for schema.
    
davisben’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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