Index: openacs-4/packages/cronjob/cronjob.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cronjob/cronjob.info,v diff -u -r1.1 -r1.2 --- openacs-4/packages/cronjob/cronjob.info 4 Nov 2001 18:04:57 -0000 1.1 +++ openacs-4/packages/cronjob/cronjob.info 15 Nov 2001 20:29:36 -0000 1.2 @@ -20,8 +20,10 @@ + + Index: openacs-4/packages/cronjob/sql/oracle/cronjob-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cronjob/sql/oracle/cronjob-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/cronjob/sql/oracle/cronjob-create.sql 4 Nov 2001 18:07:08 -0000 1.1 +++ openacs-4/packages/cronjob/sql/oracle/cronjob-create.sql 15 Nov 2001 20:29:36 -0000 1.2 @@ -5,7 +5,6 @@ -- @cvs-id $Id$ -- ---drop table cronjobs; create table cronjobs ( cronjob_id integer not null constraint cj_cronjob_id_fk references acs_objects(object_id) Index: openacs-4/packages/cronjob/sql/oracle/cronjob-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cronjob/sql/oracle/cronjob-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cronjob/sql/oracle/cronjob-drop.sql 15 Nov 2001 20:29:36 -0000 1.1 @@ -0,0 +1,9 @@ +-- +-- Cronjob in sql +-- @author tom jackson +-- @creation-date 22 Sept 2001 +-- @cvs-id $Id: cronjob-drop.sql,v 1.1 2001/11/15 20:29:36 donb Exp $ +-- +acs_object_type.drop_type('cronjob'); +drop table cronjobs; +drop package cronjob; Index: openacs-4/packages/cronjob/sql/postgresql/cronjob-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cronjob/sql/postgresql/cronjob-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/cronjob/sql/postgresql/cronjob-create.sql 4 Nov 2001 18:07:08 -0000 1.1 +++ openacs-4/packages/cronjob/sql/postgresql/cronjob-create.sql 15 Nov 2001 20:29:36 -0000 1.2 @@ -5,9 +5,6 @@ -- @cvs-id $Id$ -- --- You might comment out this line -drop table cronjobs; - create table cronjobs ( cronjob_id integer not null constraint cj_cronjob_id_fk references acs_objects(object_id) @@ -29,31 +26,26 @@ email varchar(255) ); -create function inline_0 () -returns integer as ' -begin - PERFORM acs_object_type__create_type ( - ''cronjob'', -- object_type - ''CronJob'', -- pretty_name - ''CronJobs'', -- pretty_plural - ''acs_object'', -- supertype - ''cronjobs'', -- table_name - ''cronjob_id'', -- id_column +-- DRB: since I had to remove the various "drop" commands that caused install-stopping +-- errors in the APM, I got rid of the inline function that used to surround this call +-- as well. The inline func approach is great when you need to initialize a bunch +-- of things in a single transaction (in order to get a clean rollback on failure) but +-- IMO it just sorta obfuscates the source code if you're just doing a single +-- command. All those ugly double apostrophes that are required, etc... + +select acs_object_type__create_type ( + 'cronjob', -- object_type + 'CronJob', -- pretty_name + 'CronJobs', -- pretty_plural + 'acs_object', -- supertype + 'cronjobs', -- table_name + 'cronjob_id', -- id_column null, -- package_name - ''f'', -- abstract_p + 'f', -- abstract_p null, -- type_extension_table null -- name_method - ); +); - return 0; -end;' language 'plpgsql'; - -select inline_0 (); - -drop function inline_0 (); - -drop function cronjob__cronjob_p (integer); - create function cronjob__cronjob_p (integer) returns boolean as ' @@ -72,8 +64,6 @@ end if; end;' language 'plpgsql'; -drop function cronjob__new (integer, integer, varchar, char, char, char(2), char(2), char(2), char(2), char(2), text, text, varchar, integer, varchar, integer); - create function cronjob__new (integer, integer, varchar, char, char, char(2), char(2), char(2), char(2), char(2), text, text, varchar, integer, varchar, integer) returns integer as ' declare @@ -115,8 +105,6 @@ end;' language 'plpgsql'; -drop function cronjob__delete (integer); - create function cronjob__delete (integer) returns integer as ' declare @@ -139,8 +127,6 @@ end;' language 'plpgsql'; -drop function cronjob__set_attrs (integer, integer, varchar, char, char, char(2), char(2), char(2), char(2), char(2), text, text, varchar); - create function cronjob__set_attrs (integer, integer, varchar, char, char, char(2), char(2), char(2), char(2), char(2), text, text, varchar) returns integer as ' @@ -223,8 +209,6 @@ return v_return; end;' language 'plpgsql'; -drop function cronjob__reset_attr (integer,varchar); - create function cronjob__reset_attr (integer,varchar) returns integer as ' Index: openacs-4/packages/cronjob/sql/postgresql/cronjob-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cronjob/sql/postgresql/cronjob-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cronjob/sql/postgresql/cronjob-drop.sql 15 Nov 2001 20:29:36 -0000 1.1 @@ -0,0 +1,7 @@ +select acs_object_type__drop_type('cronjob', 'f'); +drop table cronjobs; +drop function cronjob__cronjob_p (integer); +drop function cronjob__new (integer, integer, varchar, char, char, char(2), char(2), char(2), char(2), char(2), text, text, varchar, integer, varchar, integer); +drop function cronjob__delete (integer); +drop function cronjob__set_attrs (integer, integer, varchar, char, char, char(2), char(2), char(2), char(2), char(2), text, text, varchar); +drop function cronjob__reset_attr (integer,varchar);