Index: openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-create.sql,v diff -u -r1.2.2.3 -r1.2.2.4 --- openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-create.sql 13 Jun 2003 09:15:00 -0000 1.2.2.3 +++ openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-create.sql 13 Jun 2003 13:51:00 -0000 1.2.2.4 @@ -48,7 +48,35 @@ check (deleted_p in ('t','f')) ); +declare +begin + acs_object_type.create_type( + object_type => 'weblogger_channel', + pretty_name => 'Weblogger Channel', + pretty_plural => 'Weblogger Channels', + supertype => 'acs_object', + table_name => 'weblogger_channel', + id_column => 'channel_id', + package_name => null, + abstract_p => 'f', + type_extension_table => null, + name_method => 'weblogger_channel.name' + ); +end; +/ +show errors +create table weblogger_channels ( + channel_id constraint weblogger_channels_cid_fk + references acs_objects(object_id) + constraint weblogger_channels_cid_pk + primary key, + package_id constraint weblogger_channels_pid_kf + references apm_packages(package_id), + user_id integer +); + + @@ lars-blogger-package-create @@ rss-register @@ notifications-init Index: openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-drop.sql,v diff -u -r1.2.2.1 -r1.2.2.2 --- openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-drop.sql 13 Jun 2003 09:15:00 -0000 1.2.2.1 +++ openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-drop.sql 13 Jun 2003 13:51:00 -0000 1.2.2.2 @@ -12,7 +12,15 @@ @@ rss-unregister begin + acs_object_type.drop_type('weblogger_channel', 't'); +end; +/ +show errors +drop table weblogger_channels; + +begin + for blog_entry in (select entry_id from pinds_blog_entries) loop -- delete comments (which are acs_message's) for comment in (select comment_id from general_comments @@ -23,10 +31,7 @@ pinds_blog_entry.delete(blog_entry.entry_id); end loop; - acs_object_type.drop_type( - object_type => 'pinds_blog_entry', - cascade_p => 't' - ); + acs_object_type.drop_type('weblogger_channel', 't'); end; / Index: openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-package-create.sql,v diff -u -r1.1.2.3 -r1.1.2.4 --- openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-package-create.sql 13 Jun 2003 09:15:00 -0000 1.1.2.3 +++ openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-package-create.sql 13 Jun 2003 13:51:00 -0000 1.1.2.4 @@ -123,3 +123,78 @@ end pinds_blog_entry; / show errors + +create or replace package weblogger_channel +as + + function new ( + channel_id in weblogger_channels.channel_id%TYPE default null, + package_id in weblogger_channels.package_id%TYPE, + user_id in weblogger_channels.user_id%TYPE default null, + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null + ) return weblogger_channels.channel_id%TYPE; + + procedure delete ( + channel_id in weblogger_channels.channel_id%TYPE + ); + +end weblogger_channel; +/ +show errors + + +create or replace package body weblogger_channel +as + + function new ( + channel_id in weblogger_channels.channel_id%TYPE default null, + package_id in weblogger_channels.package_id%TYPE, + user_id in weblogger_channels.user_id%TYPE default null, + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null + ) return weblogger_channels.channel_id%TYPE + is + v_channel_id weblogger_channels.channel_id%TYPE; + begin + + v_channel_id := acs_object.new( + object_id => weblogger_channel.new.channel_id, + object_type => 'weblogger_channel', + creation_date => sysdate, + creation_user => weblogger_channel.new.creation_user, + creation_ip => weblogger_channel.new.creation_ip, + context_id => weblogger_channel.new.package_id + ); + + insert into weblogger_channels ( + channel_id, + package_id, + user_id + ) values ( + v_channel_id, + weblogger_channel.new.package_id, + weblogger_channel.new.user_id + ); + + return v_channel_id; + + end new; + + procedure delete ( + channel_id in weblogger_channels.channel_id%TYPE + ) + is + begin + + delete + from weblogger_channels + where channel_id = weblogger_channel.delete.channel_id; + + acs_object.delete(weblogger_channel.delete.channel_id); + + end delete; + +end weblogger_channel; +/ +show errors Index: openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-package-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-package-drop.sql,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-package-drop.sql 13 Jun 2003 09:15:00 -0000 1.1.2.1 +++ openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-package-drop.sql 13 Jun 2003 13:51:00 -0000 1.1.2.2 @@ -7,5 +7,9 @@ -- @cvs-id $Id$ -- + +drop package body weblogger_channel; +drop package weblogger_channel; + drop package body pinds_blog_entry; drop package pinds_blog_entry; Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lars-blogger/sql/oracle/upgrade/upgrade-0.8.5-0.9.sql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-create.sql,v diff -u -r1.2.2.6 -r1.2.2.7 --- openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-create.sql 13 Jun 2003 09:15:00 -0000 1.2.2.6 +++ openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-create.sql 13 Jun 2003 13:51:00 -0000 1.2.2.7 @@ -153,7 +153,7 @@ null, -- package_name 'f', -- abstract_p null, -- type_extension_table - 'weblogger_channels.name' -- name_method + 'weblogger_channels.title' -- name_method ); create table weblogger_channels ( Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lars-blogger/sql/postgresql/upgrade/upgrade-0.8.5-0.9.sql'. Fisheye: No comparison available. Pass `N' to diff?