Index: openacs-4/packages/static-portlet/sql/postgresql/static-core.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/static-portlet/sql/postgresql/static-core.sql,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/static-portlet/sql/postgresql/static-core.sql	27 Oct 2014 16:41:55 -0000	1.7
+++ openacs-4/packages/static-portlet/sql/postgresql/static-core.sql	7 Aug 2017 23:48:29 -0000	1.8
@@ -61,11 +61,12 @@
 --
 create table static_portal_content (
     content_id                  integer
-                                                                constraint static_p_c_fk
+                                constraint static_p_c_fk
                                 references acs_objects(object_id)
                                 constraint static_p_c_pk
                                 primary key,
     package_id                  integer
+                                references acs_objects(object_id) on delete cascade
                                 not null,
     pretty_name                 varchar(100)
                                 constraint static_p_c_pretty_name_nn
@@ -76,6 +77,7 @@
 				check (format in ('text/enhanced', 'text/plain', 'text/fixed-width', 'text/html'))
 );
 
+create index static_portal_content_package_id_idx on static_portal_content(package_id);
 
 
 --
