1 -- $Id: psql-destroy.sql,v 1.5 2005-10-12 06:08:37 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 :version_tbl
38 DROP TABLE :version_tbl;
40 \echo Dropping :recent_tbl
41 DROP TABLE :recent_tbl;
43 \echo Dropping :nonempty_tbl
44 DROP TABLE :nonempty_tbl;
46 \echo Dropping :link_tbl
49 --\echo Dropping :user_tbl
50 -- DROP TABLE :user_tbl;
52 \echo Dropping :rating_tbl
53 DROP TABLE :rating_tbl;
55 \echo Dropping :page_tbl
57 \echo Dropping :page_id_seq only needed for postgresql < 7.2
58 DROP SEQUENCE :page_id_seq;
60 DROP INDEX :page_id_idx;
61 DROP INDEX :page_name_idx;
62 DROP INDEX :page_pkey;
63 DROP INDEX :page_pagename_key;
65 \echo Dropping :member_tbl
66 DROP TABLE :member_tbl;
68 \echo Dropping :pref_tbl
71 \echo Dropping :session_tbl
72 DROP TABLE :session_tbl;
74 \echo Dropping :accesslog_tbl
75 DROP TABLE :accesslog_tbl;
77 DROP INDEX :page_id_idx;
78 DROP INDEX :page_name_idx;
79 DROP INDEX :vers_id_idx;
80 DROP INDEX :vers_mtime_idx;
81 DROP INDEX :recent_id_idx;