Index: openacs-4/packages/acs-kernel/sql/postgresql/apm-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/apm-create.sql,v
diff -u -r1.32 -r1.33
--- openacs-4/packages/acs-kernel/sql/postgresql/apm-create.sql	21 Dec 2002 22:31:17 -0000	1.32
+++ openacs-4/packages/acs-kernel/sql/postgresql/apm-create.sql	23 Jan 2003 17:47:04 -0000	1.33
@@ -79,16 +79,16 @@
 begin
 -- Create a new object type for packages.
  PERFORM acs_object_type__create_type (
-   ''apm_package'',
-   ''Package'',
-   ''Packages'',
-   ''acs_object'',
-   ''APM_PACKAGES'',
-   ''package_id'',
-   ''apm_package'',
-   ''f'',
-   ''apm_package_types'',
-   ''apm_package.name''
+   ''apm_package'',         -- object_type
+   ''Package'',             -- pretty_name
+   ''Packages'',            -- pretty_plural
+   ''acs_object'',          -- supertype
+   ''APM_PACKAGES'',        -- table_name
+   ''package_id'',          -- id_column
+   ''apm_package'',         -- package_name
+   ''f'',                   -- abstract_p
+   ''apm_package_types'',   -- type_extension_table
+   ''apm_package.name''     -- name_method
    );
 
   return 0;
@@ -665,6 +665,31 @@
  manages the order of the authors.
 ';
 
+create table apm_package_callbacks (
+    version_id         integer 
+                       constraint apm_package_callbacks_vid_fk 
+                       references apm_package_versions(version_id)
+                       on delete cascade,
+    type               varchar(40),
+    proc               varchar(300),
+    constraint apm_package_callbacks_vt_un
+    unique (version_id, type)
+);
+
+comment on table apm_package_callbacks is '
+  This table holds names of Tcl procedures to invoke at the time (before or after) the package is
+  installed, instantiated, or mounted.        
+';
+
+comment on column apm_package_callbacks.proc is '
+  Name of the Tcl proc.
+';
+
+comment on column apm_package_callbacks.type is '
+  Indicates when the callback proc should be invoked, for example after-install. Valid
+  values are given by the Tcl proc apm_supported_callback_types.
+';
+
 -- Ths view faciliates accessing information about package versions by joining
 -- the apm_package_types information and acs_object_types information (which is
 -- invariant across versions) with the specific version information.
