Hi,

I am checking my drupal site with schema module (http://drupal.org/project/schema) and it report one issue about imagecache schema:

imagecache_action
o column weight:
declared: array('type' => 'int', 'unsigned' => FALSE, 'not null' => TRUE, 'default' => 0)
actual: array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'disp-width' => '11')

Maybe it issue could be important.

Comments

Matto’s picture

I've noticed the same thing. I'm assuming this is problematic, so I've uninstalled imagecache.

damienmckenna’s picture

This is a tiny, insignificant issue that won't cause any problems until you reach 2147683648 actions :) I certainly wouldn't stop using imagecache because of it. However, it should be patched just to remove the issue.

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new763 bytes

PLEASE IGNORE. My mistake, weight columns should be SIGNED INT.

gbaudoin’s picture

StatusFileSize
new782 bytes

Hello !

The ALTER in the update unction of the patch should read :

$ret[] = db_query("ALTER TABLE {imagecache_action} MODIFY weight INT UNSIGNED NOT NULL DEFAULT 0");

in order to keep the NULL DEFAULT 0 as defined by the schema.

sir_squall’s picture

Thx gbaudoin to have submmited my patch.

It works perfectly

drewish’s picture

Status: Needs review » Needs work

The ALTER statement is MySQL specific. We need to use db_change_column() to alter the schema.

avpaderno’s picture

Title: Database schema inconsistent » Inconsistent database schema
dboulet’s picture

Status: Needs work » Closed (duplicate)

Marked #344327: Installation scheme error as a duplicate.

dboulet’s picture

Status: Closed (duplicate) » Needs work
drewish’s picture

dboulet’s picture

@drewish, did you mean #441138: schema module reports a mismatch instead?

drewish’s picture

Status: Needs work » Fixed
StatusFileSize
new2.85 KB

okay, well the new table sort stuff does negative weights so i went a head and made it unsigned to match the old schema. i also fixed some array formatting. committing the attached to HEAD.

Status: Fixed » Closed (fixed)

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