Forum OpenACS Q&A: photo-album upgrade (4.6.1->5.2.x)

For posterity:

packages/photo-album/sql/postgresql/upgrade/upgrade-4.6.1-4.6.2.sql
causes the APM to spew the following:

psql:upgrade-4.6.1-4.6.2.sql:8: ERROR: function pa_collection__new(integer, integer, character varying, timestamp without time zone, integer, character varying, integer) does not exist

It is just trying to delete a function that does not exist (from the sql file):

---
Line 8: drop function pa_collection__new (integer,integer,varchar,timestamp,integer,varchar,integer);

create or replace function pa_collection__new (integer,integer,varchar,timestamptz,integer,varchar,integer)
----

Similarly in upgrade-5.2.0d1-5.2.0d2.sql the following two lines cause problems:

Line 5: alter table pa_package_root_folder_map drop constraint pa_pack_fldr_map_pack_id_fk;

and

Line 9: alter table pa_package_root_folder_map drop constraint pa_pack_fldr_map_fldr_id_fk;

Errors:

psql:upgrade-5.2.0d1-5.2.0d2.sql:5: ERROR: constraint "pa_pack_fldr_map_pack_id_fk" does not exist

psql:upgrade-5.2.0d1-5.2.0d2.sql:9: ERROR: constraint "pa_pack_fldr_map_fldr_id_fk" does not exist

Also a "trying to drop something that does not exist" issue.

Both errors require hand loading of the sql upgrade scripts and subsequent deselection of the files on upgrade using the APM (the above errors can be ignored).