I am using schema and it says the amazon module has a mismatched table

amazon_item

column listpriceamount - differences on: scale, precision
declared: array('description' => t('TODO: please describe this field!'), 'type' => 'numeric')
actual: array('description' => t('TODO: please describe this field!'), 'type' => 'numeric', 'not null' => FALSE, 'precision' => '10', 'scale' => '0')
column lowestpriceamount - differences on: scale, precision
declared: array('description' => t('TODO: please describe this field!'), 'type' => 'numeric')
actual: array('description' => t('TODO: please describe this field!'), 'type' => 'numeric', 'not null' => FALSE, 'precision' => '10', 'scale' => '0')
column amazonpriceamount - differences on: scale, precision
declared: array('description' => t('TODO: please describe this field!'), 'type' => 'numeric')
actual: array('description' => t('TODO: please describe this field!'), 'type' => 'numeric', 'not null' => FALSE, 'precision' => '10', 'scale' => '0')

Comments

basicmagic.net’s picture

subscribe

pancho’s picture

Title: Mismatched table in schema » Mandatory parameters missing in schema definition
Category: support » bug
Status: Active » Needs review
StatusFileSize
new1.36 KB

I can reproduce this, however it does no harm.

The reason is that if the mandatory values for 'not null', 'precision' and 'scale' are omitted in the schema definition the defaults are automatically added to the table definition. So in any case the tables are correct.

Enclosed patch fixes the definition. Please test & review.

zazinteractive’s picture

Pancho, that seems to have worked

cvining’s picture

Problem and fix confirmed in Version 7.x-1.0-beta5 too.

More of an annoyance than a problem, but now Schema and "Status Report" report no problems. Makes it much easier to identify genuine website problems, so thanks much for the patch above. Yeah!

pancho’s picture

Will get committed as soon as I find any time. Atm, I'm unfortunately absolutely out of time.

rfay’s picture

Status: Needs review » Fixed

Committed to 6.x-1.x: a5adf13ea2ade90542b2f339feff72c889afef1b
and to 7.x-1.x: 7c62452f8527648b7992da1d9aaf9a73f7a49ca7

Status: Fixed » Closed (fixed)

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