Package: gallery2
Version: 2.1-1

Upgrading the software from gallery v2.0.4 to (debian package) 2.1-1
works fine. However, when you run the gallery upgrade application it fails.

I'm not a developer, so caveat emptor .. but applying the fix I describe
here made things work:

http://gallery.menalto.com/node/47759

================================================================

The following looks to be the required fix - it successfully through the
upgrade.

It looks like a Postgres SQL statement in the template has been
overlooked ... the file that I've updated is:
modules/core/classes/GalleryStorage/schema.tpl

.. and here is the diff:

==========================
--- schema.tpl.ORIG 2006-03-20 16:38:59.000000000 +0000
+++ schema.tpl 2006-04-12 15:33:26.000000000 +0100
@@ -809,7 +809,11 @@
# A_GalleryAccessMap_1.0
DROP INDEX DB_TABLE_PREFIXAccessMap_33666;

-ALTER TABLE DB_TABLE_PREFIXAccessMap ADD COLUMN
DB_COLUMN_PREFIXuserOrGroupId INTEGER DEFAULT '0';
+ALTER TABLE DB_TABLE_PREFIXAccessMap ADD COLUMN
DB_COLUMN_PREFIXuserOrGroupId INTEGER;
+
+UPDATE g2_AccessMap
+ SET g_userOrGroupId='0'
+ WHERE g_userOrGroupId IS NULL;

ALTER TABLE DB_TABLE_PREFIXAccessMap ALTER DB_COLUMN_PREFIXuserOrGroupId
SET NOT NULL;

==========================

Note: When you rerun the upgrade you will get a note in stage-1 saying
this file has been modified.
================================================================

Cheers


Ivan
-- 
Ivan Beveridge <[EMAIL PROTECTED]>


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to