/ db / functions /
/db/functions/destroyfunctions.m4
1 dnl Copyright (C) 2012, 2015 The Meme Factory, Inc. http://www.meme.com/
2 dnl
3 dnl This file is part of Gombe-MI.
4 dnl
5 dnl Gombe-MI is free software; you can redistribute it and/or modify
6 dnl it under the terms of the GNU General Public License as published by
7 dnl the Free Software Foundation; either version 3 of the License, or
8 dnl (at your option) any later version.
9 dnl
10 dnl This program is distributed in the hope that it will be useful,
11 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
12 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 dnl GNU General Public License for more details.
14 dnl
15 dnl You should have received a copy of the GNU General Public License
16 dnl along with Gombe-MI. If not, see <http://www.gnu.org/licenses/>.
17 dnl
18 dnl Remove all functions from the database
19 dnl
20 dnl Karl O. Pinc <kop@meme.com>
21 dnl
22 dnl Bugs:
23 dnl The abstraction of the datatypes that uses column names does not
24 dnl really work. Combinations of errors and changing table definition
25 dnl can leave an old function lying around.
26 dnl
27 dnl m4 includes
28 include(`copyright.m4')
29 include(`types.m4')
30 include(`constants.m4')
31
32 --
33 -- Remove all functions from the database so
34 -- we can re-create it with our creation scripts.
35 --
36
37 --
38 -- Functions
39 --
40
41 --
42 -- General purpose
43 --
44 -- DROP FUNCTION FOO();
45 DROP FUNCTION infer_gc(DATE, VARCHAR(gmi_animid_len));
46 DROP FUNCTION infer_gc(INT);
47 DROP FUNCTION delete_gc(DATE, VARCHAR(gmi_animid_len));
48 DROP FUNCTION delete_gc(INT);
49 DROP FUNCTION followfunc(INT, VARCHAR(gmi_animid_len));
50 DROP FUNCTION followrole(INT, VARCHAR(gmi_animid_len));
51 DROP FUNCTION mom_in_gc(VARCHAR(gmi_animid_len), BIGINT, DATE);
52 DROP FUNCTION infants_in_gc(VARCHAR(gmi_animid_len), BIGINT, DATE);
53 DROP FUNCTION add_social_partners(VARCHAR(gmi_animid_len), BIGINT);
54
55 -- The warning system
56 include(`destroywarningfunctions.m4')