Posted by davidwhthomas on August 12, 2008 at 10:41pm
3 followers
| Project: | ImageCache |
| Version: | 5.x-2.1 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Hi,
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:
<?php
// code for imagecache.install > imagecache_update_4()
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
$ret[] = update_sql("ALTER TABLE {imagecache_action} ADD COLUMN action varchar(255) not null default '' after weight");
case 'pgsql':
// @todo: pgsql updates. DONE
$ret[] = update_sql("ALTER TABLE {imagecache_action} ADD COLUMN action varchar(255) not null default ''");
break;
}
?>tested and works for me :-)
thanks for the great module by the way, absolutely essential stuff. nicely done!
Comments
#1
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.
#2
Has this patch been implemented into the CVS releases of imagecache?
#3
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.
#4
committed the attached to HEAD and DRUPAL-5--2.
#5
Automatically closed -- issue fixed for two weeks with no activity.