1 -- $Id: psql-destroy.sql,v 1.11 2006-12-23 11:48:58 rurban Exp $
5 --================================================================
6 -- Prefix for table names.
8 -- You should set this to the same value you specify for
9 -- DATABASE_PREFIX in config/config.ini
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 \set pagedata_tbl :prefix 'pagedata'
38 \set versiondata_tbl :prefix 'versiondata'
39 \set pageperm_tbl :prefix 'pageperm'
40 \set existing_page_view :prefix 'existing_page'
41 \set curr_page_view :prefix 'curr_page'
42 \set update_recent_fn :prefix 'update_recent'
43 \set prepare_rename_fn :prefix 'prepare_rename_page'
45 \echo Dropping table :version_tbl
46 DROP TABLE :version_tbl CASCADE;
48 \echo Dropping table :recent_tbl
49 DROP TABLE :recent_tbl CASCADE;
51 \echo Dropping table :nonempty_tbl
52 DROP TABLE :nonempty_tbl CASCADE;
54 \echo Dropping experimental pagedata tables (not yet used)
55 DROP TABLE :pagedata_tbl CASCADE;
56 DROP TABLE :versiondata_tbl CASCADE;
57 DROP TABLE :pageperm_tbl CASCADE;
59 \echo Dropping table :link_tbl
62 \echo Dropping table :rating_tbl
63 DROP TABLE :rating_tbl;
65 \echo Dropping view :existing_page
66 DROP VIEW :existing_page_view;
68 \echo Dropping view :curr_page
69 DROP VIEW :curr_page_view;
71 \echo Dropping table :page_tbl
72 DROP TABLE :page_tbl CASCADE;
73 \echo Dropping :page_id_seq only needed for postgresql < 7.2
75 \echo Dropping table :member_tbl
76 DROP TABLE :member_tbl;
78 \echo Dropping table :pref_tbl
81 --\echo Dropping table :user_tbl
82 --DROP TABLE :user_tbl;
84 \echo Dropping table :session_tbl
85 DROP TABLE :session_tbl;
87 \echo Dropping table :accesslog_tbl
88 DROP TABLE :accesslog_tbl;
90 \echo Dropping stored procedures
91 DROP FUNCTION :update_recent_fn (INT4, INT4);
92 DROP FUNCTION :prepare_rename_fn (INT4, INT4);