Hi all, After suffer this problem in several galleries for some years, finally I've found an easy workaround. You have to convert the problematic columns, from integer type to text (as suggested in the gallery2 error):
gallery2 = # g_ImageBlockCacheMap ALTER TABLE ALTER COLUMN TYPE g_userId text; ALTER TABLE ALTER TABLE gallery2=# ALTER TABLE g_ImageBlockCacheMap ALTER COLUMN g_itemType TYPE text; gallery2 = # g_ImageBlockCacheMap ALTER TABLE ALTER COLUMN TYPE g_itemType text; ALTER TABLE ALTER TABLE After change the type of both columns, the errors do not appear anymore. This is not what I was trying to find out, but in the meantime it works. In any case, I guess that this problem is not a problem of the DB schema in itself, but probably of the ImageBlockCacheMap class (int casts?): http://gallery.svn.sourceforge.net/viewvc/gallery/branches/BRANCH_2_1/gallery2/modules/imageblock/classes/ImageBlockHelper.class?r1=12540&r2=12689&pathrev=20937 http://gallery.svn.sourceforge.net/viewvc/gallery/branches/BRANCH_2_1/gallery2/modules/imageblock/classes/GalleryStorage/schema.tpl?revision=13394&view=markup&pathrev=20937 http://gallery.svn.sourceforge.net/viewvc/gallery/branches/BRANCH_2_2/gallery2/modules/imageblock/classes/GalleryStorage/schema.tpl?view=log&pathrev=20937 In the logs of the upgrade process, there's only a DB schema upgrade in the 2.2.1 version, on 2007-09-23 13:57:04. 2007-09-23 13:57:07 [TMP_SESSION_ID_DI_NOISSES_PMT] <hr /> (postgres7): UPDATE g_Schema SET gg_createSql = 'CREATE TABLE DB_TABLE_PREFIXImageBlockCacheMap( DB_COLUMN_PREFIXuserId INTEGER NOT NULL, DB_COLUMN_PREFIXitemType INTEGER NOT NULL, DB_COLUMN_PREFIXitemTimestamp INTEGER NOT NULL, DB_COLUMN_PREFIXitemId INTEGER NOT NULL ); Hope this info will be helpful. Best regards, Gustavo. -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

