Index: openacs-4/packages/dotlrn/sql/postgresql/dotlrn-init.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/dotlrn-init.sql,v diff -u -r1.16 -r1.17 --- openacs-4/packages/dotlrn/sql/postgresql/dotlrn-init.sql 5 Jul 2018 11:16:16 -0000 1.16 +++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-init.sql 12 Jul 2018 11:13:31 -0000 1.17 @@ -128,9 +128,24 @@ '#dotlrn.dotlrn_club_description#' ); - update acs_object_types set table_name = 'dotlrn_community', package_name = 'dotlrn_community' where object_type = 'dotlrn_community'; - update acs_object_types set table_name = 'dotlrn_class_instance', package_name = 'dotlrn_class_instance' where object_type = 'dotlrn_class_instance'; - update acs_object_types set table_name = 'dotlrn_club', package_name = 'dotlrn_club' where object_type = 'dotlrn_club'; + -- dotlrn_communities is a view and cannot be used as + -- table_name. I know there are cases downstream where + -- dotlrn_communities_all is also a view, but at least here on + -- valilla it's a table. + update acs_object_types set + table_name = 'dotlrn_communities_all', + package_name = 'dotlrn_community' + where object_type = 'dotlrn_community'; + + update acs_object_types set + table_name = 'dotlrn_class_instances', + package_name = 'dotlrn_class_instance' + where object_type = 'dotlrn_class_instance'; + + update acs_object_types set + table_name = 'dotlrn_clubs', + package_name = 'dotlrn_club' + where object_type = 'dotlrn_club'; perform acs_attribute__create_attribute( 'dotlrn_community',