3 # This file is part of Koha.
5 # Copyright (C) 2012 ByWater Solutions
6 # Copyright (C) 2013 Equinox Software, Inc.
8 # Koha is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 3 of the License, or
11 # (at your option) any later version.
13 # Koha is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with Koha; if not, see <http://www.gnu.org/licenses>.
23 use DBIx
::Class
::Schema
::Loader qw
/ make_schema_at /;
29 my $db_driver = 'mysql';
30 my $db_host = 'localhost';
39 "db_driver=s" => \
$db_driver,
40 "db_host=s" => \
$db_host,
41 "db_port=s" => \
$db_port,
42 "db_name=s" => \
$db_name,
43 "db_user=s" => \
$db_user,
44 "db_passwd=s" => \
$db_passwd,
48 # If we were asked for usage instructions, do it
49 pod2usage
(1) if defined $help;
51 if (! defined $db_name ) {
52 print "Error: \'db_name\' parameter is mandatory.\n";
58 { debug
=> 1, dump_directory
=> $path, preserve_case
=> 1 },
59 ["DBI:$db_driver:dbname=$db_name;host=$db_host;port=$db_port",$db_user, $db_passwd ]
67 misc/devel/update_dbix_class_files.pl
71 update_dbix_class_files.pl --db_name=db-name --db_user=db-user \
72 --db_passwd=db-pass ...
74 The command in usually called from the root directory for the Koha source tree.
75 If you are runing from another directory, use the --path switch to specify
96 DB driver to be used. (defaults to 'mysql')
100 hostname for the DB server. (defaults to 'localhost')
104 port number for the DB server. (defaults to '3306')
108 path into which create the schema files. (defaults to './')
112 prints this help text