Index: openacs-4/packages/chat/sql/postgresql/chat-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/sql/postgresql/chat-drop.sql,v diff -u -N -r1.5.2.3 -r1.5.2.4 --- openacs-4/packages/chat/sql/postgresql/chat-drop.sql 28 Feb 2019 16:09:03 -0000 1.5.2.3 +++ openacs-4/packages/chat/sql/postgresql/chat-drop.sql 1 Mar 2019 17:26:00 -0000 1.5.2.4 @@ -6,45 +6,13 @@ -- @cvs-id $Id$ -- - --drop objects - - - -- --- procedure inline_0/0 +-- Drop chat_room object types and tables -- -CREATE OR REPLACE FUNCTION inline_0( +select acs_object_type__drop_type('chat_transcript','t', 't'); +select acs_object_type__drop_type('chat_room','t', 't'); -) RETURNS integer AS $$ -DECLARE - object_rec record; -BEGIN - for object_rec in select object_id from acs_objects where object_type='chat_transcript' - loop - PERFORM acs_object__delete( object_rec.object_id ); - end loop; - - for object_rec in select object_id from acs_objects where object_type='chat_room' - loop - PERFORM acs_object__delete( object_rec.object_id ); - end loop; - return 0; -END; -$$ LANGUAGE plpgsql; - -select inline_0 (); -drop function inline_0 (); - - --- --- Drop chat_room object type --- -select acs_object_type__drop_type('chat_room','t'); -select acs_object_type__drop_type('chat_transcript','t'); - drop table chat_msgs; -drop table chat_transcripts; -drop table chat_rooms; --