1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220
|
--
-- $Id$
--
-- This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
-- project.
--
-- Copyright (C) 1998-2018 OpenLink Software
--
-- This project is free software; you can redistribute it and/or modify it
-- under the terms of the GNU General Public License as published by the
-- Free Software Foundation; only version 2 of the License, dated June 1991.
--
-- This program is distributed in the hope that it will be useful, but
-- WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- General Public License for more details.
--
-- You should have received a copy of the GNU General Public License along
-- with this program; if not, write to the Free Software Foundation, Inc.,
-- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--
------------------------------------------------------------------------------
-- bmk-d.sql
-- script for cleaning wa installation.
------------------------------------------------------------------------------
create procedure BMK.WA.uninstall ()
{
for select WAI_INST from DB.DBA.WA_INSTANCE WHERE WAI_TYPE_NAME = 'Bookmark' do
{
(WAI_INST as DB.DBA.wa_bookmark).wa_drop_instance();
commit work;
}
}
;
BMK.WA.uninstall ()
;
create procedure BMK.WA.uninstall ()
{
for select DB.DBA.DAV_SEARCH_PATH (COL_ID, 'C') path from WS.WS.SYS_DAV_COL where COL_DET = 'Bookmark' do
{
DB.DBA.DAV_DELETE_INT (path, 1, null, null, 0);
commit work;
}
}
;
BMK.WA.uninstall ()
;
-- Scheduler
BMK.WA.exec_no_error ('DELETE FROM DB.DBA.SYS_SCHEDULED_EVENT WHERE SE_NAME = \'Bookmark Exchange Scheduler\'');
VHOST_REMOVE (lpath => '/bookmark');
VHOST_REMOVE (lpath => '/dataspace/services/bookmark');
-- NNTP
BMK.WA.exec_no_error ('DROP procedure DB.DBA.BOOKMARKS_NEWS_MSG_I');
BMK.WA.exec_no_error ('DROP procedure DB.DBA.BOOKMARKS_NEWS_MSG_U');
BMK.WA.exec_no_error ('DROP procedure DB.DBA.BOOKMARKS_NEWS_MSG_D');
BMK.WA.exec_no_error ('DB.DBA.NNTP_NEWS_MSG_DEL (\'BOOKMARKS\')');
-- Scheduler
BMK.WA.exec_no_error('DELETE FROM DB.DBA.SYS_SCHEDULED_EVENT WHERE SE_NAME = \'BM tags aggregator\'');
-- Triggers
BMK.WA.exec_no_error('DROP TRIGGER WA_MEMBER_AU_BMK');
-- Tables
BMK.WA.exec_no_error('DROP VIEW BMK.DBA.TAGS_STATISTICS');
BMK.WA.exec_no_error('DROP TABLE BMK.WA.SETTINGS');
BMK.WA.exec_no_error('DROP TABLE BMK.WA.TAGS');
BMK.WA.exec_no_error('DROP TABLE BMK.WA.GRANTS');
BMK.WA.exec_no_error('DROP TABLE BMK.WA.ANNOTATIONS');
BMK.WA.exec_no_error('DROP TABLE BMK.WA.BOOKMARK_COMMENT');
BMK.WA.exec_no_error('DROP TABLE BMK.WA.BOOKMARK_DATA');
BMK.WA.exec_no_error('DROP TABLE BMK.WA.BOOKMARK_DOMAIN');
BMK.WA.exec_no_error('DROP TABLE BMK.WA.SFOLDER');
BMK.WA.exec_no_error('DROP TABLE BMK.WA.FOLDER');
BMK.WA.exec_no_error('DROP TABLE BMK.WA.BOOKMARK');
BMK.WA.exec_no_error('DROP TABLE BMK.WA.EXCHANGE');
-- Types
BMK.WA.exec_no_error('delete from WA_TYPES where WAT_NAME = \'Bookmark\'');
BMK.WA.exec_no_error('drop type wa_bookmark');
-- Views
BMK.WA.exec_no_error('drop view BMK..TAGS_VIEW');
BMK.WA.exec_no_error('drop view BMK..GRANTS_VIEW');
BMK.WA.exec_no_error('drop view BMK..GRANTS_OBJECT_VIEW');
-- Registry
registry_remove ('_bookmark_path_');
registry_remove ('_bookmark_version_');
registry_remove ('_bookmark_build_');
registry_remove ('__ods_bookmark_sioc_init');
registry_remove ('bmk_table_update');
registry_remove ('bmk_index_version');
registry_remove ('bmk_path_update');
registry_remove ('bmk_path_upgrade2');
registry_remove ('bmk_services_update');
-- Procedures
create procedure BMK.WA.drop_procedures()
{
for (select P_NAME from DB.DBA.SYS_PROCEDURES where P_NAME like 'BMK.WA.%') do
{
if (P_NAME not in ('BMK.WA.exec_no_error', 'BMK.WA.drop_procedures'))
BMK.WA.exec_no_error(sprintf('drop procedure %s', P_NAME));
}
}
;
-- dropping procedures for BMK
BMK.WA.drop_procedures();
BMK.WA.exec_no_error('DROP procedure BMK.WA.drop_procedures');
-- dropping SIOC procs
BMK.WA.exec_no_error('DROP procedure SIOC.DBA.bmk_post_iri');
BMK.WA.exec_no_error('DROP procedure SIOC.DBA.bmk_comment_iri');
BMK.WA.exec_no_error('DROP procedure SIOC.DBA.bmk_annotation_iri');
BMK.WA.exec_no_error('DROP procedure SIOC.DBA.bmk_links_to');
BMK.WA.exec_no_error('DROP procedure SIOC.DBA.bmk_tag_iri');
BMK.WA.exec_no_error('DROP procedure SIOC.DBA.fill_ods_bookmark_sioc2');
BMK.WA.exec_no_error('DROP procedure SIOC.DBA.clean_ods_bookmark_sioc2');
BMK.WA.exec_no_error('DROP procedure SIOC.DBA.bookmark_domain_insert');
BMK.WA.exec_no_error('DROP procedure SIOC.DBA.bookmark_domain_delete');
BMK.WA.exec_no_error('DROP procedure SIOC.DBA.bookmark_comments_insert');
BMK.WA.exec_no_error('DROP procedure SIOC.DBA.bookmark_comments_delete');
BMK.WA.exec_no_error('DROP procedure SIOC.DBA.bmk_comment_insert');
BMK.WA.exec_no_error('DROP procedure SIOC.DBA.bmk_comment_delete');
BMK.WA.exec_no_error('DROP procedure SIOC.DBA.bookmark_annotations_insert');
BMK.WA.exec_no_error('DROP procedure SIOC.DBA.bookmark_annotations_delete');
BMK.WA.exec_no_error('DROP procedure SIOC.DBA.bmk_annotation_insert');
BMK.WA.exec_no_error('DROP procedure SIOC.DBA.bmk_annotation_delete');
BMK.WA.exec_no_error('DROP procedure SIOC.DBA.bmk_claims_insert');
BMK.WA.exec_no_error('DROP procedure SIOC.DBA.bmk_claims_delete');
BMK.WA.exec_no_error('DROP procedure SIOC.DBA.ods_bookmark_sioc_init');
-- RDF Views - procs & views
BMK.WA.exec_no_error ('DROP procedure SIOC.DBA.rdf_bookmark_view_str');
BMK.WA.exec_no_error ('DROP procedure SIOC.DBA.rdf_bookmark_view_str_tables');
BMK.WA.exec_no_error ('DROP procedure SIOC.DBA.rdf_bookmark_view_str_maps');
BMK.WA.exec_no_error ('DROP procedure DB.DBA.ODS_BMK_TAGS');
BMK.WA.exec_no_error ('DROP view DB.DBA.ODS_BMK_POSTS');
BMK.WA.exec_no_error ('DROP view DB.DBA.ODS_BMK_TAGS');
-- reinit
ODS_RDF_VIEW_INIT ();
-- dropping ODS procs
BMK.WA.exec_no_error('DROP procedure DB.DBA.wa_search_bmk_get_excerpt_html');
BMK.WA.exec_no_error('DROP procedure DB.DBA.wa_collect_bmk_tags');
-- dropping SIOC procs
BMK.WA.exec_no_error('DROP procedure DBA.DB.bookmarks_import');
BMK.WA.exec_no_error('DROP procedure DBA.DB.bookmarks_export');
BMK.WA.exec_no_error('DROP procedure DBA.DB.bookmarks_update');
-- dropping API procs
BMK.WA.exec_no_error('DROP procedure ODS.ODS_API."bookmark.get"');
BMK.WA.exec_no_error('DROP procedure ODS.ODS_API."bookmark.new"');
BMK.WA.exec_no_error('DROP procedure ODS.ODS_API."bookmark.edit"');
BMK.WA.exec_no_error('DROP procedure ODS.ODS_API."bookmark.delete"');
BMK.WA.exec_no_error('DROP procedure ODS.ODS_API."bookmark.folder.new"');
BMK.WA.exec_no_error('DROP procedure ODS.ODS_API."bookmark.folder.delete"');
BMK.WA.exec_no_error('DROP procedure ODS.ODS_API."bookmark.import"');
BMK.WA.exec_no_error('DROP procedure ODS.ODS_API."bookmark.export"');
BMK.WA.exec_no_error('DROP procedure ODS.ODS_API."bookmark.comment.get"');
BMK.WA.exec_no_error('DROP procedure ODS.ODS_API."bookmark.comment.new"');
BMK.WA.exec_no_error('DROP procedure ODS.ODS_API."bookmark.comment.delete"');
BMK.WA.exec_no_error('DROP procedure ODS.ODS_API."bookmark.publication.new"');
BMK.WA.exec_no_error('DROP procedure ODS.ODS_API."bookmark.publication.edit"');
BMK.WA.exec_no_error('DROP procedure ODS.ODS_API."bookmark.publication.delete"');
BMK.WA.exec_no_error('DROP procedure ODS.ODS_API."bookmark.subscription.new"');
BMK.WA.exec_no_error('DROP procedure ODS.ODS_API."bookmark.subscription.edit"');
BMK.WA.exec_no_error('DROP procedure ODS.ODS_API."bookmark.subscription.delete"');
BMK.WA.exec_no_error('DROP procedure ODS.ODS_API."bookmark.options.set"');
BMK.WA.exec_no_error('DROP procedure ODS.ODS_API."bookmark.options.get"');
-- dropping DET procs
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_FIXNAME"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_COMPOSE_XBEL_NAME"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_COMPOSE_FOLDERS_PATH"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_ACCESS_PARAMS"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_AUTHENTICATE"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_AUTHENTICATE_HTTP"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_GET_PARENT"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_COL_CREATE"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_COL_MOUNT"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_COL_MOUNT_HERE"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_DELETE"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_RES_UPLOAD"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_PROP_REMOVE"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_PROP_SET"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_PROP_GET"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_PROP_LIST"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_DIR_SINGLE"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_DIR_LIST"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_FC_PRED_METAS"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_FC_TABLE_METAS"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_FC_PRINT_WHERE"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_DIR_FILTER"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_SEARCH_ID_IMPL"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_SEARCH_ID"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_SEARCH_PATH"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_RES_UPLOAD_COPY"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_RES_UPLOAD_MOVE"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_RES_CONTENT"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_SYMLINK"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_DEREFERENCE_LIST"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_RESOLVE_PATH"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_LOCK"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_UNLOCK"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_IS_LOCKED"');
BMK.WA.exec_no_error('DROP procedure DB.DBA."bookmark_DAV_LIST_LOCKS"');
-- final proc
BMK.WA.exec_no_error('DROP procedure BMK.WA.exec_no_error');
|