1 -- $Id: psql-destroy.sql,v 1.1 2004-07-22 16:49:20 dfrankow Exp $
6 --================================================================
7 -- Prefix for table names.
9 -- You should set this to the same value you specify for
10 -- $DBParams['prefix'] in index.php.
14 --================================================================
15 -- Which postgres user gets access to the tables?
17 -- You should set this to the name of the postgres
18 -- user who will be accessing the tables.
20 -- Commonly, connections from php are made under
21 -- the user name of 'nobody', 'apache' or 'www'.
23 \set httpd_user 'rurban'
25 --================================================================
27 -- Don't modify below this point unless you know what you are doing.
29 --================================================================
31 \set qprefix '\'' :prefix '\''
32 \set qhttp_user '\'' :httpd_user '\''
33 \echo Initializing PhpWiki tables with:
34 \echo ' prefix = ' :qprefix
35 \echo ' httpd_user = ' :qhttp_user
37 \echo 'Expect some \'Relation \'*\' does not exists\' errors unless you are'
38 \echo 'overwriting existing tables.'
40 \set page_tbl :prefix 'page'
41 \set page_id :prefix 'page_id'
42 \set page_nm :prefix 'page_nm'
44 \set version_tbl :prefix 'version'
45 \set vers_id :prefix 'vers_id'
46 \set vers_mtime :prefix 'vers_mtime'
48 \set recent_tbl :prefix 'recent'
49 \set recent_id :prefix 'recent_id'
51 \set nonempty_tbl :prefix 'nonempty'
52 \set nonmt_id :prefix 'nonmt_id'
54 \set link_tbl :prefix 'link'
55 \set link_from :prefix 'link_from'
56 \set link_to :prefix 'link_to'
58 \set session_tbl :prefix 'session'
59 \set sess_id :prefix 'sess_id'
60 \set sess_date :prefix 'sess_date'
61 \set sess_ip :prefix 'sess_ip'
63 \set pref_tbl :prefix 'pref'
64 \set pref_id :prefix 'pref_id'
66 \echo Dropping :page_tbl
69 \echo Dropping :version_tbl
70 DROP TABLE :version_tbl;
72 \echo Dropping :recent_tbl
73 DROP TABLE :recent_tbl;
75 \echo Dropping :nonempty_tbl
76 DROP TABLE :nonempty_tbl;
78 \echo Dropping :link_tbl
81 \echo Dropping :session_tbl
82 DROP TABLE :session_tbl;
84 -- Optional DB Auth and Prefs
85 -- For these tables below the default table prefix must be used
86 -- in the DBAuthParam SQL statements also.
88 \echo Dropping :pref_tbl