hello
I have schema module installed to control the correctness of data in the database
and I have a problem with the incompatibility (mismatch)
how to fix it ? can anyone help
below description

image_fupload

    fupload_previewlist
        column uid - difference on: length
        declared: array('description' => t('TODO: please describe this field!'), 'type' => 'int', 'length' => '10', 'not null' => TRUE, 'default' => 0)
        actual: array('description' => t('TODO: please describe this field!'), 'type' => 'int', 'not null' => TRUE, 'default' => 0)
        column nid - difference on: length
        declared: array('description' => t('TODO: please describe this field!'), 'type' => 'int', 'length' => '10', 'not null' => TRUE, 'default' => 0)
        actual: array('description' => t('TODO: please describe this field!'), 'type' => 'int', 'not null' => TRUE, 'default' => 0)
        column fid - differences on: not null, length
        declared: array('description' => t('TODO: please describe this field!'), 'type' => 'int', 'length' => '11', 'not null' => FALSE, 'default' => 0)
        actual: array('description' => t('TODO: please describe this field!'), 'type' => 'int', 'not null' => TRUE, 'default' => 0)
        column created - difference on: length
        declared: array('description' => t('TODO: please describe this field!'), 'type' => 'int', 'length' => '11', 'not null' => TRUE, 'default' => 0)
        actual: array('description' => t('TODO: please describe this field!'), 'type' => 'int', 'not null' => TRUE, 'default' => 0)

Comments

mikedotexe’s picture

Yeah, I have bosses and coworkers that are sick of seeing that there are schema mismatches.

I'm no drupal expert, but my fix has seemed to work and FUpload still works.
It seems like the actual schema returned does not match what's in the database, very weird.

So I simply opened up
modules/image_fupload/image_fupload.install

and removed all lines:

      'uid' => array(
        'type' => 'int',
        'length' => '10',              <~~~~~~ REMOVE
        'default' => 0,
        'not null' => TRUE,
        'description' => t('Stores user id.'),
        'no export' => TRUE,
      ),
      'nid' => array(
        'type' => 'int',
        'length' => '10',              <~~~~~~ REMOVE
        'default' => 0,
        'not null' => TRUE,
        'description' => t('Stores node id.'),
        'no export' => TRUE,
      ),
      'fid' => array(
        'type' => 'int',
        'length' => '11',              <~~~~~~ REMOVE
        'default' => 0,
        'not null' => TRUE,              <~~~~~~ CHANGED
        'description' => t('Stores file id of uploaded image.'),
        'no export' => TRUE,
      ),
      'created' => array(
        'type' => 'int',
        'length' => '11',              <~~~~~~ REMOVE
        'default' => 0,
        'not null' => TRUE,
        'description' => t('Stores creation time to do some clean up by cron.'),
        'no export' => TRUE,
      ),

and run update.php

Now the schemas are returning the same value and no error is thrown.

While we're at it, under 'fid', you might want to change 'not null' => TRUE as I have shown so that the schema page doesn't have that warning at the top.

I peeked in the database and this hasn't done any changes, so I think this is a safe hack, perhaps safest to apply AFTER you've installed the module.