1 -- $Id: psql-destroy.sql,v 1.9 2005-11-16 07:33:43 rurban Exp $
5 --================================================================
6 -- Prefix for table names.
8 -- You should set this to the same value you specify for
9 -- $DBParams['prefix'] in index.php.
13 --================================================================
15 -- Don't modify below this point unless you know what you are doing.
17 --================================================================
19 \set qprefix '\'' :prefix '\''
20 \echo Dropping all PhpWiki tables with:
21 \echo ' prefix = ' :qprefix
24 \set page_tbl :prefix 'page'
25 \set page_id_seq :prefix 'page_id_seq'
26 \set version_tbl :prefix 'version'
27 \set recent_tbl :prefix 'recent'
28 \set nonempty_tbl :prefix 'nonempty'
29 \set link_tbl :prefix 'link'
30 \set session_tbl :prefix 'session'
31 \set pref_tbl :prefix 'pref'
32 --\set user_tbl :prefix 'user'
33 \set member_tbl :prefix 'member'
34 \set rating_tbl :prefix 'rating'
35 \set accesslog_tbl :prefix 'accesslog'
37 \echo Dropping table :version_tbl
38 DROP TABLE :version_tbl CASCADE;
40 \echo Dropping table :recent_tbl
41 DROP TABLE :recent_tbl CASCADE;
43 \echo Dropping table :nonempty_tbl
44 DROP TABLE :nonempty_tbl CASCADE;
46 \echo Dropping experimental pagedata tables (not yet used)
47 DROP TABLE pagedata CASCADE;
48 DROP TABLE versiondata CASCADE;
49 DROP TABLE pageperm CASCADE;
51 \echo Dropping table :link_tbl
54 \echo Dropping table :rating_tbl
55 DROP TABLE :rating_tbl;
57 \set existing_page :prefix 'existing_page'
58 \echo Dropping view :existing_page
59 DROP VIEW :existing_page;
61 \set curr_page :prefix 'curr_page'
62 \echo Dropping view :curr_page
65 \echo Dropping table :page_tbl
66 DROP TABLE :page_tbl CASCADE;
67 \echo Dropping :page_id_seq only needed for postgresql < 7.2
69 \echo Dropping table :member_tbl
70 DROP TABLE :member_tbl;
72 \echo Dropping table :pref_tbl
75 --\echo Dropping table :user_tbl
76 --DROP TABLE :user_tbl;
78 \echo Dropping table :session_tbl
79 DROP TABLE :session_tbl;
81 \echo Dropping table :accesslog_tbl
82 DROP TABLE :accesslog_tbl;
84 \echo Dropping stored procedures
85 DROP FUNCTION update_recent (INT4, INT4);
86 DROP FUNCTION prepare_rename_page (INT4, INT4);