1Wiki::Toolkit::Setup::SUQsLeirteC(o3n)tributed Perl DocuWmieknit:a:tTiooonlkit::Setup::SQLite(3)
2
3
4

NAME

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

SYNOPSIS

10         use Wiki::Toolkit::Setup::SQLite;
11         Wiki::Toolkit::Setup::SQLite::setup( $dbfile );
12

DESCRIPTION

14       Set up a SQLite database for use as a Wiki::Toolkit store.
15

FUNCTIONS

17       setup
18             use Wiki::Toolkit::Setup::SQLite;
19
20             Wiki::Toolkit::Setup::SQLite::setup( $filename );
21
22           or
23
24             Wiki::Toolkit::Setup::SQLite::setup( $dbh );
25
26           Takes one argument - either the name of the file that the SQLite
27           database is stored in or an active database handle.
28
29           NOTE: If a table that the module wants to create already exists,
30           "setup" will leave it alone. This means that you can safely run
31           this on an existing Wiki::Toolkit database to bring the schema up
32           to date with the current Wiki::Toolkit version. If you wish to
33           completely start again with a fresh database, run "cleardb" first.
34
35           An optional second argument may be passed specifying the schema
36           version to use; this is ONLY intended to be used during unit
37           testing and should not normally be specified.
38
39       cleardb
40             use Wiki::Toolkit::Setup::SQLite;
41
42             # Clear out all Wiki::Toolkit tables from the database.
43             Wiki::Toolkit::Setup::SQLite::cleardb( $filename );
44
45           or
46
47             Wiki::Toolkit::Setup::SQLite::cleardb( $dbh );
48
49           Takes one argument - either the name of the file that the SQLite
50           database is stored in or an active database handle.
51
52           Clears out all Wiki::Toolkit store tables from the database. NOTE
53           that this will lose all your data; you probably only want to use
54           this for testing purposes or if you really screwed up somewhere.
55           Note also that it doesn't touch any Wiki::Toolkit search backend
56           tables; if you have any of those in the same or a different
57           database see Wiki::Toolkit::Setup::DBIxFTS or
58           Wiki::Toolkit::Setup::SII, depending on which search backend you're
59           using.
60

ALTERNATIVE CALLING SYNTAX

62       As requested by Podmaster.  Instead of passing arguments to the methods
63       as
64
65         ($filename)
66
67       you can pass them as
68
69         ( { dbname => $filename } )
70
71       or indeed
72
73         ( { dbh => $dbh } )
74
75       Note that's a hashref, not a hash.
76

AUTHOR

78       Kake Pugh (kake@earth.li).
79
81            Copyright (C) 2002-2004 Kake Pugh.  All Rights Reserved.
82            Copyright (C) 2006-2009 the Wiki::Toolkit team. All Rights Reserved.
83
84       This module is free software; you can redistribute it and/or modify it
85       under the same terms as Perl itself.
86

SEE ALSO

88       Wiki::Toolkit, Wiki::Toolkit::Setup::DBIxFTS, Wiki::Toolkit::Setup::SII
89
90
91
92perl v5.34.0                      2022-01-21   Wiki::Toolkit::Setup::SQLite(3)
Impressum