Currently Postgres users get an error running update.php when upgrading to imagecache 2.x

Here's the Postgres SQL for imagecache_update_4() to make it work.

Simply remove the mysql-specific 'after weight' from the SQL. i.e:

// code for imagecache.install > imagecache_update_4()
switch ($GLOBALS['db_type']) {
$ret[] = update_sql("ALTER TABLE {imagecache_action} ADD COLUMN action varchar(255) not null default '' after weight");
// @todo: pgsql updates. DONE
$ret[] = update_sql("ALTER TABLE {imagecache_action} ADD COLUMN action varchar(255) not null default ''");

tested and works for me :-)

thanks for the great module by the way, absolutely essential stuff. nicely done!

#4 imagecache_294538.patch743 bytesdrewish


davidwhthomas’s picture

For the search engines ;-)

Postgres fix for error:

# warning: pg_query() [function.pg-query]: Query failed: ERROR: column "action" of relation "imagecache_action" does not exist LINE 1: UPDATE imagecache_action SET action='imagecache_deprecated_s... ^ in /var/www/site/includes/database.pgsql.inc on line 125.

# user warning: query: UPDATE imagecache_action SET action='imagecache_deprecated_scale', data='a:3:{s:3:"fit";s:6:"inside";s:5:"width";s:3:"100";s:6:"height";s:3:"100";}' WHERE actionid = 1 in /var/www/site/includes/database.pgsql.inc on line 144.

See above post for solution.

Gompho’s picture

Has this patch been implemented into the CVS releases of imagecache?

drewish’s picture

Status:Needs review» Needs work

Gompho, if you see an issue marked fixed you can assume it's been committed.

As this stands it's needs to be converted to a proper patch for review. See http://drupal.org/patch for help on creating one.

drewish’s picture

Title:postgres support for imagecache 2.x update included» Postgres support for imagecache_update_4()
Status:Needs work» Fixed
new743 bytes

committed the attached to HEAD and DRUPAL-5--2.

Anonymous’s picture

Status:Fixed» Closed (fixed)

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