Bug 8798: (follow-up) rename schema class updater script
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 21 Sep 2012 16:16:04 +0000 (12:16 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 14 Oct 2013 21:08:01 +0000 (21:08 +0000)
updateDatabase.pl is a bit too close to updatedatabase.pl in installer
and may cause some confusion. I would suggest update_dbix_class_files.pl
as a unambiguous and descriptive name for this file.

Signed-off-by: wajasu <matted-34813@mypacks.net>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
misc/devel/updateDatabase.pl [deleted file]
misc/devel/update_dbix_class_files.pl [new file with mode: 0755]

diff --git a/misc/devel/updateDatabase.pl b/misc/devel/updateDatabase.pl
deleted file mode 100755 (executable)
index 83ac357..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use warnings;
-use C4::Context;
-use DBIx::Class::Schema::Loader qw/ make_schema_at /;
-use Getopt::Long;
-
-my $path = "./";
-GetOptions(
-    "path=s" => \$path,
-    );
-my $context = new C4::Context;
-my $db_driver;
-if ($context->config("db_scheme")){
-    $db_driver=C4::Context->db_scheme2dbi($context->config("db_scheme"));
-}else{
-    $db_driver="mysql";
-}
-
-
-my $db_name   = $context->config("database");
-my $db_host   = $context->config("hostname");
-my $db_port   = $context->config("port") || '';
-my $db_user   = $context->config("user");
-my $db_passwd = $context->config("pass");
-
-make_schema_at("Koha::Schema", {debug => 1, dump_directory => $path}, ["DBI:$db_driver:dbname=$db_name;host=$db_host;port=$db_port",$db_user, $db_passwd ]);
diff --git a/misc/devel/update_dbix_class_files.pl b/misc/devel/update_dbix_class_files.pl
new file mode 100755 (executable)
index 0000000..83ac357
--- /dev/null
@@ -0,0 +1,28 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use C4::Context;
+use DBIx::Class::Schema::Loader qw/ make_schema_at /;
+use Getopt::Long;
+
+my $path = "./";
+GetOptions(
+    "path=s" => \$path,
+    );
+my $context = new C4::Context;
+my $db_driver;
+if ($context->config("db_scheme")){
+    $db_driver=C4::Context->db_scheme2dbi($context->config("db_scheme"));
+}else{
+    $db_driver="mysql";
+}
+
+
+my $db_name   = $context->config("database");
+my $db_host   = $context->config("hostname");
+my $db_port   = $context->config("port") || '';
+my $db_user   = $context->config("user");
+my $db_passwd = $context->config("pass");
+
+make_schema_at("Koha::Schema", {debug => 1, dump_directory => $path}, ["DBI:$db_driver:dbname=$db_name;host=$db_host;port=$db_port",$db_user, $db_passwd ]);