Fisheye: Tag 1.3 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/oracle/upgrade/upgrade-0.8.9-9.0.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/oracle/upgrade/Attic/upgrade-0.8.9-9.0.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lars-blogger/sql/oracle/upgrade/upgrade-0.8.9-9.0.sql 24 Oct 2003 16:59:21 -0000 1.1 @@ -0,0 +1,132 @@ +-- +-- Upgrade script +-- +-- @author Simon Carstensen (simon@collaboraid.biz) +-- @creation-date 2003-06-13 +-- + +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 +); + +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 + +-- Remove the new parameter rss_file_name and update the old one +-- We do this since the APM does not know that the old parameter +-- has been replaced and we want to retain the values of the old parameter +declare + v_parameter_id integer; +begin + + select parameter_id into v_parameter_id + from apm_parameters + where parameter_name = 'rss_file_name'; + + apm.unregister_parameter(v_parameter_id); + +end; +/ +show errors + +update apm_parameters + set parameter_name = 'rss_file_name', + description = 'What name should we advertise the RSS feed under, relative to the blog mount point. Leave blank if no RSS feed.', + default_value = 'rss.xml' + where parameter_name = 'rss_file_url'; Fisheye: Tag 1.3 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? Index: openacs-4/packages/lars-blogger/sql/postgresql/upgrade/upgrade-0.8.9-9.0.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/postgresql/upgrade/Attic/upgrade-0.8.9-9.0.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lars-blogger/sql/postgresql/upgrade/upgrade-0.8.9-9.0.sql 24 Oct 2003 16:59:21 -0000 1.1 @@ -0,0 +1,177 @@ +-- +-- Upgrade script +-- +-- @author Simon Carstensen (simon@collaboraid.biz) +-- @creation-date 2003-06-13 +-- + +create or replace function pinds_blog_entry__new ( + integer, -- entry_id + integer, -- package_id + varchar, -- title + varchar, -- title_url + varchar, -- content + varchar, -- content_format + timestamptz, -- entry_date + char, -- draft_p + integer, -- creation_user + varchar -- creation_ip +) returns integer as ' +declare + p_entry_id alias for $1; + p_package_id alias for $2; + p_title alias for $3; + p_title_url alias for $4; + p_content alias for $5; + p_content_format alias for $6; + p_entry_date alias for $7; + p_draft_p alias for $8; + p_creation_user alias for $9; + p_creation_ip alias for $10; + v_entry_id integer; +begin + v_entry_id := acs_object__new ( + p_entry_id, + ''pinds_blog_entry'', + current_timestamp, + p_creation_user, + p_creation_ip, + p_package_id + ); + + insert into pinds_blog_entries ( + entry_id, + package_id, + title, + title_url, + content, + content_format, + entry_date, + posted_date, + draft_p, + deleted_p + ) values ( + v_entry_id, + p_package_id, + p_title, + p_title_url, + p_content, + p_content_format, + p_entry_date, + current_timestamp, + p_draft_p, + ''f'' + ); + + PERFORM acs_permission__grant_permission( + v_entry_id, + p_creation_user, + ''admin'' + ); + + return v_entry_id; +end; +' language 'plpgsql'; + +select acs_object_type__create_type ( + 'weblogger_channel', -- object_type + 'Weblogger Channel', -- pretty_name + 'Weblogger Channels', -- pretty_plural + 'acs_object', -- supertype + 'weblogger_channels', -- table_name + 'channel_id', -- id_column + null, -- package_name + 'f', -- abstract_p + null, -- type_extension_table + 'weblogger_channels.name' -- name_method +); + +create table weblogger_channels ( + channel_id integer + constraint channel_id_fk + references acs_objects(object_id) + constraint weblogger_channels_pk + primary key, + package_id integer + constraint weblogger_channels_package_id_kf + references apm_packages(package_id), + user_id integer +); + + + +create or replace function weblogger_channel__new ( + integer, -- channel_id + integer, -- package_id + integer, -- user_id + integer, -- creation_user + varchar -- creation_ip +) returns integer as ' +declare + p_channel_id alias for $1; + p_package_id alias for $2; + p_user_id alias for $3; + p_creation_user alias for $4; + p_creation_ip alias for $5; + v_channel_id integer; +begin + v_channel_id := acs_object__new ( + p_channel_id, + ''weblogger_channel'', + current_timestamp, + p_creation_user, + p_creation_ip, + p_package_id + ); + + insert into weblogger_channels ( + channel_id, + package_id, + user_id + ) values ( + v_channel_id, + p_package_id, + p_user_id + ); + + return v_channel_id; +end; +' language 'plpgsql'; + +create or replace function weblogger_channel__delete (integer) +returns integer as ' +declare + p_channel_id alias for $1; +begin + delete from weblogger_channels + where channel_id = p_channel_id; + PERFORM acs_object__delete(p_channel_id); + return 0; +end; +' language 'plpgsql'; + +-- Remove the new parameter rss_file_name and update the old one +-- We do this since the APM does not know that the old parameter +-- has been replaced and we want to retain the values of the old parameter +create function inline_0 () +returns integer as ' +declare + v_parameter_id integer; +begin + select parameter_id into v_parameter_id + from apm_parameters + where parameter_name = ''rss_file_name''; + + perform apm__unregister_parameter(v_parameter_id); + + return 0; +end; +' language 'plpgsql'; +select inline_0 (); +drop function inline_0 (); + +update apm_parameters + set parameter_name = 'rss_file_name', + description = 'What name should we advertise the RSS feed under, relative to the blog mount point. Leave blank if no RSS feed.', + default_value = 'rss.xml' + where parameter_name = 'rss_file_url';