]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - schemas/psql-destroy.sql
Separate into 'initialize' and 'destroy' SQL
[SourceForge/phpwiki.git] / schemas / psql-destroy.sql
1 -- $Id: psql-destroy.sql,v 1.1 2004-07-22 16:49:20 dfrankow Exp $
2
3 \set QUIET
4
5
6 --================================================================
7 -- Prefix for table names.
8 --
9 -- You should set this to the same value you specify for
10 -- $DBParams['prefix'] in index.php.
11
12 \set prefix     ''
13
14 --================================================================
15 -- Which postgres user gets access to the tables?
16 --
17 -- You should set this to the name of the postgres
18 -- user who will be accessing the tables.
19 --
20 -- Commonly, connections from php are made under
21 -- the user name of 'nobody', 'apache' or 'www'.
22
23 \set httpd_user 'rurban'
24
25 --================================================================
26 --
27 -- Don't modify below this point unless you know what you are doing.
28 --
29 --================================================================
30
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
36 \echo
37 \echo 'Expect some \'Relation \'*\' does not exists\' errors unless you are'
38 \echo 'overwriting existing tables.'
39
40 \set page_tbl           :prefix 'page'
41 \set page_id            :prefix 'page_id'
42 \set page_nm            :prefix 'page_nm'
43
44 \set version_tbl        :prefix 'version'
45 \set vers_id            :prefix 'vers_id'
46 \set vers_mtime         :prefix 'vers_mtime'
47
48 \set recent_tbl         :prefix 'recent'
49 \set recent_id          :prefix 'recent_id'
50
51 \set nonempty_tbl       :prefix 'nonempty'
52 \set nonmt_id           :prefix 'nonmt_id'
53
54 \set link_tbl           :prefix 'link'
55 \set link_from          :prefix 'link_from'
56 \set link_to            :prefix 'link_to'
57
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'
62
63 \set pref_tbl           :prefix 'pref'
64 \set pref_id            :prefix 'pref_id'
65
66 \echo Dropping :page_tbl
67 DROP TABLE :page_tbl;
68
69 \echo Dropping :version_tbl
70 DROP TABLE :version_tbl;
71
72 \echo Dropping :recent_tbl
73 DROP TABLE :recent_tbl;
74
75 \echo Dropping :nonempty_tbl
76 DROP TABLE :nonempty_tbl;
77
78 \echo Dropping :link_tbl
79 DROP TABLE :link_tbl;
80
81 \echo Dropping :session_tbl
82 DROP TABLE :session_tbl;
83
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.
87
88 \echo Dropping :pref_tbl
89 DROP TABLE :pref_tbl;