Hi Jeff,
Is it to late to commit bug fixes to 5.1? You see, I caught a couple of problems with some of the upgrade scripts when I completed the upgrade of infogettable.net from 4.5b to openacs-5-0-compat yesterday:
Several upgrade scripts in acs-kernel drop and recreate the views "registered_users" and "cc_user" ... However, they can't simply be dropped but need to be dopped with CASCADE (I'm on PG 7.3.5 in case that matters) since "registered_users_of_package_id" and "cc_users_of_package_id" are referencing the base views respectively.
ETP defines a new content_type twice in one upgrade script (see the diff below).
If this is not too late and seems OK with Joel and you, which branch should I commit it to?
Index: upgrade-4.6.3-4.6.4.sql
===================================================================
RCS file: /cvsweb/infogettable/packages/acs-kernel/sql/postgresql/upgrade/upgrade-4.6.3-4.6.4.sql,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- upgrade-4.6.3-4.6.4.sql 18 Apr 2004 15:55:09 -0000 1.1.1.1
+++ upgrade-4.6.3-4.6.4.sql 20 Apr 2004 12:51:30 -0000 1.2
@@ -5,7 +5,7 @@
--
-- @author Lars Pind (lars@collaboraid.biz)
-- @creation-date 2003-05-28
--- @cvs-id $Id: upgrade-4.6.3-4.6.4.sql,v 1.1.1.1 2004/04/18 15:55:09 nsadmin Exp $
+-- @cvs-id $Id: upgrade-4.6.3-4.6.4.sql,v 1.2 2004/04/20 12:51:30 nsadmin Exp $
--
@@ -26,7 +26,7 @@
-- recreate the registered_users view
-drop view registered_users;
+drop view registered_users CASCADE;
create view registered_users
as
@@ -41,10 +41,15 @@
and mr.member_state = 'approved'
and u.email_verified_p = 't';
+create view registered_users_of_package_id
+as
+SELECT u.*, au.package_id
+FROM application_users au, registered_users u
+WHERE (au.user_id = u.user_id);
-- recreate the cc_users view
-drop view cc_users;
+drop view cc_users CASCADE;
create view cc_users
as
@@ -59,6 +64,12 @@
and m.rel_id = mr.rel_id
and m.container_id = m.group_id;
+create view cc_users_of_package_id
+as
+SELECT u.*, au.package_id
+FROM application_users au, cc_users u
+WHERE (au.user_id = u.user_id);
+
-- Fixing a really lame = null bug in this proc that would cause default values
-- of new parameters to not be propagated to package instances
create or replace function apm__register_parameter (integer,varchar,varchar,varchar,varchar,varchar,varchar,integer,integer)
Index: upgrade-5.0.0b3-5.0.0b4.sql
===================================================================
RCS file: /cvsweb/infogettable/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.0d2-5.0d3.sql,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- upgrade-5.0d2-5.0d3.sql 18 Apr 2004 15:55:10 -0000 1.1.1.1
+++ upgrade-5.0d2-5.0d3.sql 20 Apr 2004 12:51:30 -0000 1.2
@@ -3,7 +3,7 @@
--
-- @author Peter Marklund (peter@collaboraid.biz)
--
--- @cvs-id $Id: upgrade-5.0d2-5.0d3.sql,v 1.1.1.1 2004/04/18 15:55:10 nsadmin Exp $
+-- @cvs-id $Id: upgrade-5.0d2-5.0d3.sql,v 1.2 2004/04/20 12:51:30 nsadmin Exp $
--
-- ****** New authentication datamodel
@@ -237,7 +237,7 @@
alter table users add constraint users_authority_username_un
unique (authority_id, username);
-drop view cc_users;
+drop view cc_users CASCADE;
create view cc_users
as
select o.*, pa.*, pe.*, u.*, mr.member_state, mr.rel_id
@@ -250,3 +250,9 @@
and m.group_id = amo.object_id
and m.rel_id = mr.rel_id
and m.container_id = m.group_id;
+
+create view cc_users_of_package_id
+as
+SELECT u.*, au.package_id
+FROM application_users au, cc_users u
+WHERE (au.user_id = u.user_id);
....
Index: upgrade-1.1d-1.2.sql
===================================================================
RCS file: /cvsweb/infogettable/packages/edit-this-page/sql/postgresql/upgrade/upgrade-1.1d-1.2.sql,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- upgrade-1.1d-1.2.sql 19 Apr 2004 14:30:46 -0000 1.1.1.1
+++ upgrade-1.1d-1.2.sql 19 Apr 2004 16:07:09 -0000 1.2
@@ -185,14 +185,4 @@
end;
' language 'plpgsql';
-select content_type__create_type (
- 'etp_page_revision', -- content_type
- 'content_revision', -- supertype
- 'ETP managed page', -- pretty_name
- 'ETP managed pages', -- pretty_plural
- 'etp_page_revisions', -- table_name
- 'etp_page_revision_id', -- id_column
- 'content_revision__revision_name' -- name_method
-);
-
\i ../edit-this-page-sc-create.sql
\ No newline at end of file
PS. The upgrade went without much trouble. Amazingly, considering the 4.5b starting point. Kudos and many thanks to the good folks that carved out the proper upgrade path to 5.0 (Andrei Popov, Joel Aufrecht, and Dave Bauer to name but a few...) Thanks for the *great* documentation!