Index: openacs-4/packages/download/sql/postgresql/download-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/sql/postgresql/download-drop.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/download/sql/postgresql/download-drop.sql 10 May 2001 20:32:55 -0000 1.1 +++ openacs-4/packages/download/sql/postgresql/download-drop.sql 11 May 2001 05:20:01 -0000 1.2 @@ -65,12 +65,12 @@ drop table download_downloads; drop table download_revision_data; drop table download_archive_revisions; -drop table download_archives; +--drop table download_archives; drop table download_metadata_choices; drop table download_archive_metadata; drop table download_reasons; drop table download_archive_types; -drop table download_repository; +--drop table download_repository; --drop table download_archive_descs; /* acs_object_type */ Index: openacs-4/packages/download/sql/postgresql/download-packages.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/sql/postgresql/download-packages.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/download/sql/postgresql/download-packages.sql 10 May 2001 20:32:55 -0000 1.1 +++ openacs-4/packages/download/sql/postgresql/download-packages.sql 11 May 2001 05:20:01 -0000 1.2 @@ -41,6 +41,7 @@ new__creation_ip alias for $9; -- default null v_name cr_items.name%TYPE; v_repository_id integer; + v_revision_id integer; begin v_name := ''download_repository'' || new__repository_id; select into v_repository_id content_item__new ( @@ -67,6 +68,13 @@ values (new__repository_id); + -- get the latest revision + select content_item__get_latest_revision ( v_repository_id ) + into v_revision_id; + + -- make it live + select content_item__set_live_revision ( v_revision_id ); + return v_repository_id; end;' language 'plpgsql';