]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - schemas/psql-destroy.sql
Allow bold, italics or underlined for numbers
[SourceForge/phpwiki.git] / schemas / psql-destroy.sql
1 \set QUIET
2
3 -- ================================================================
4 -- Prefix for table names.
5 --
6 -- You should set this to the same value you specify for
7 -- DATABASE_PREFIX in config/config.ini
8
9 \set prefix     ''
10
11 -- ================================================================
12 --
13 -- Don't modify below this point unless you know what you are doing.
14 --
15 -- ================================================================
16
17 \set qprefix '\'' :prefix '\''
18 \echo Dropping all PhpWiki tables with:
19 \echo '       prefix = ' :qprefix
20 \echo
21
22 \set page_tbl           :prefix 'page'
23 \set page_id_seq        :prefix 'page_id_seq'
24 \set version_tbl        :prefix 'version'
25 \set recent_tbl         :prefix 'recent'
26 \set nonempty_tbl       :prefix 'nonempty'
27 \set link_tbl           :prefix 'link'
28 \set session_tbl        :prefix 'session'
29 \set pref_tbl           :prefix 'pref'
30 -- \set user_tbl                :prefix 'user'
31 \set member_tbl         :prefix 'member'
32 \set rating_tbl         :prefix 'rating'
33 \set accesslog_tbl      :prefix 'accesslog'
34
35 \set pagedata_tbl       :prefix 'pagedata'
36 \set versiondata_tbl    :prefix 'versiondata'
37 \set pageperm_tbl       :prefix 'pageperm'
38 \set existing_page_view :prefix 'existing_page'
39 \set curr_page_view     :prefix 'curr_page'
40 \set update_recent_fn   :prefix 'update_recent'
41 \set prepare_rename_fn  :prefix 'prepare_rename_page'
42
43 \echo Dropping table :version_tbl
44 DROP TABLE :version_tbl CASCADE;
45
46 \echo Dropping table :recent_tbl
47 DROP TABLE :recent_tbl CASCADE;
48
49 \echo Dropping table :nonempty_tbl
50 DROP TABLE :nonempty_tbl CASCADE;
51
52 \echo Dropping experimental pagedata tables (not yet used)
53 DROP TABLE :pagedata_tbl CASCADE;
54 DROP TABLE :versiondata_tbl CASCADE;
55 DROP TABLE :pageperm_tbl CASCADE;
56
57 \echo Dropping table :link_tbl
58 DROP TABLE :link_tbl;
59
60 \echo Dropping table :rating_tbl
61 DROP TABLE :rating_tbl;
62
63 \echo Dropping view :existing_page
64 DROP VIEW :existing_page_view;
65
66 \echo Dropping view :curr_page
67 DROP VIEW :curr_page_view;
68
69 \echo Dropping table :page_tbl
70 DROP TABLE :page_tbl CASCADE;
71 \echo Dropping :page_id_seq only needed for postgresql < 7.2
72
73 \echo Dropping table :member_tbl
74 DROP TABLE :member_tbl;
75
76 \echo Dropping table :pref_tbl
77 DROP TABLE :pref_tbl;
78
79 -- \echo Dropping table :user_tbl
80 -- DROP TABLE :user_tbl;
81
82 \echo Dropping table :session_tbl
83 DROP TABLE :session_tbl;
84
85 \echo Dropping table :accesslog_tbl
86 DROP TABLE :accesslog_tbl;
87
88 \echo Dropping stored procedures
89 DROP FUNCTION :update_recent_fn (INT4, INT4);
90 DROP FUNCTION :prepare_rename_fn (INT4, INT4);