/ db / views /
/db/views/destroyviewfunctions.m4
1 dnl Copyright (C) 2012, 2013 The Meme Factory, Inc. http://www.meme.com/
2 dnl Copyright (C) 2005, 2008, Karl O. Pinc <kop@meme.com>
3 dnl
4 dnl This file is part of Gombe-MI.
5 dnl
6 dnl Gombe-MI is free software; you can redistribute it and/or modify
7 dnl it under the terms of the GNU General Public License as published by
8 dnl the Free Software Foundation; either version 3 of the License, or
9 dnl (at your option) any later version.
10 dnl
11 dnl This program is distributed in the hope that it will be useful,
12 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 dnl GNU General Public License for more details.
15 dnl
16 dnl You should have received a copy of the GNU General Public License
17 dnl along with Gombe-MI. If not, see <http://www.gnu.org/licenses/>.
18 dnl
19 dnl Remove all functions supporting view rules from the database
20 dnl
21 dnl Karl O. Pinc <kop@meme.com>
22 dnl
23 dnl Bugs:
24 dnl The abstraction of the datatypes that uses column names does not
25 dnl really work. Combinations of errors and changing table definition
26 dnl can leave an old function lying around.
27 dnl
28 dnl m4 includes
29 include(`copyright.m4')
30 include(`types.m4')
31
32 --
33 -- Remove all functions from the database that support views so
34 -- we can re-create them with our creation scripts.
35 --
36
37 --
38 -- Functions
39 --
40
41 DROP FUNCTION _error_immutable_view() CASCADE;
42 DROP FUNCTION _raise_gombemi_exception(TEXT) CASCADE;
43
44 --
45 -- Triggers
46 --
47 DROP FUNCTION community_membership_upload_insert_func() CASCADE;
48 DROP FUNCTION community_membership_upload_update_func() CASCADE;
49 DROP FUNCTION community_membership_upload_delete_func() CASCADE;
50
51 DROP FUNCTION biography_insert_func() CASCADE;
52 DROP FUNCTION biography_update_func() CASCADE;
53 DROP FUNCTION biography_delete_func() CASCADE;
54
55 DROP FUNCTION biography_upload_insert_func() CASCADE;
56 DROP FUNCTION biography_upload_update_func() CASCADE;
57 DROP FUNCTION biography_upload_delete_func() CASCADE;
58
59 DROP FUNCTION upload_behaviors_insert_func() CASCADE;
60
61 DROP FUNCTION focal_follows_insert_func() CASCADE;
62 DROP FUNCTION focal_follows_update_func() CASCADE;
63 DROP FUNCTION focal_follows_delete_func() CASCADE;
64
65 DROP FUNCTION follow_intervals_insert_func() CASCADE;
66 DROP FUNCTION follow_intervals_update_func() CASCADE;
67 DROP FUNCTION follow_intervals_delete_func() CASCADE;
68
69 DROP FUNCTION family_events_insert_func() CASCADE;
70 DROP FUNCTION family_events_update_func() CASCADE;
71 DROP FUNCTION family_events_delete_func() CASCADE;
72
73 DROP FUNCTION datasheet_events_insert_func() CASCADE;
74 DROP FUNCTION datasheet_events_update_func() CASCADE;
75 DROP FUNCTION datasheet_events_delete_func() CASCADE;
76
77 DROP FUNCTION family_dists_insert_func() CASCADE;
78 DROP FUNCTION family_dists_update_func() CASCADE;
79 DROP FUNCTION family_dists_delete_func() CASCADE;
80
81 DROP FUNCTION _error_immutable(TEXT) CASCADE;