1Wiki::Toolkit::Setup::PUgs(e3r)Contributed Perl DocumentWaitkiio:n:Toolkit::Setup::Pg(3)
2
3
4

NAME

6       Wiki::Toolkit::Setup::Pg - Set up tables for a Wiki::Toolkit store in a
7       Postgres database.
8

SYNOPSIS

10         use Wiki::Toolkit::Setup::Pg;
11         Wiki::Toolkit::Setup::Pg::setup($dbname, $dbuser, $dbpass, $dbhost);
12
13       Omit $dbhost if the database is local.
14

DESCRIPTION

16       Set up a Postgres database for use as a Wiki::Toolkit store.
17

FUNCTIONS

19       setup
20             use Wiki::Toolkit::Setup::Pg;
21             Wiki::Toolkit::Setup::Pg::setup($dbname, $dbuser, $dbpass, $dbhost);
22
23           or
24
25             Wiki::Toolkit::Setup::Pg::setup( $dbh );
26
27           You can either provide an active database handle $dbh or connection
28           parameters.
29
30           If you provide connection parameters the following arguments are
31           mandatory -- the database name, the username and the password. The
32           username must be able to create and drop tables in the database.
33
34           The $dbhost argument is optional -- omit it if the database is
35           local.
36
37           NOTE: If a table that the module wants to create already exists,
38           "setup" will leave it alone. This means that you can safely run
39           this on an existing Wiki::Toolkit database to bring the schema up
40           to date with the current Wiki::Toolkit version. If you wish to
41           completely start again with a fresh database, run "cleardb" first.
42
43       cleardb
44             use Wiki::Toolkit::Setup::Pg;
45
46             # Clear out all Wiki::Toolkit tables from the database.
47             Wiki::Toolkit::Setup::Pg::cleardb($dbname, $dbuser, $dbpass, $dbhost);
48
49           or
50
51             Wiki::Toolkit::Setup::Pg::cleardb( $dbh );
52
53           You can either provide an active database handle $dbh or connection
54           parameters.
55
56           If you provide connection parameters the following arguments are
57           mandatory -- the database name, the username and the password. The
58           username must be able to drop tables in the database.
59
60           The $dbhost argument is optional -- omit it if the database is
61           local.
62
63           Clears out all Wiki::Toolkit store tables from the database. NOTE
64           that this will lose all your data; you probably only want to use
65           this for testing purposes or if you really screwed up somewhere.
66           Note also that it doesn't touch any Wiki::Toolkit search backend
67           tables; if you have any of those in the same or a different
68           database see Wiki::Toolkit::Setup::DBIxFTS or
69           Wiki::Toolkit::Setup::SII, depending on which search backend you're
70           using.
71

ALTERNATIVE CALLING SYNTAX

73       As requested by Podmaster.  Instead of passing arguments to the methods
74       as
75
76         ($dbname, $dbuser, $dbpass, $dbhost)
77
78       you can pass them as
79
80         ( { dbname => $dbname,
81             dbuser => $dbuser,
82             dbpass => $dbpass,
83             dbhost => $dbhost
84           }
85         )
86
87       or indeed as
88
89         ( { dbh => $dbh } )
90
91       Note that's a hashref, not a hash.
92

AUTHOR

94       Kake Pugh (kake@earth.li).
95
97            Copyright (C) 2002-2004 Kake Pugh.  All Rights Reserved.
98            Copyright (C) 2006-2008 the Wiki::Toolkit team. All Rights Reserved.
99
100       This module is free software; you can redistribute it and/or modify it
101       under the same terms as Perl itself.
102

SEE ALSO

104       Wiki::Toolkit, Wiki::Toolkit::Setup::DBIxFTS, Wiki::Toolkit::Setup::SII
105
106
107
108perl v5.34.0                      2022-01-21       Wiki::Toolkit::Setup::Pg(3)
Impressum