From c8548b27a7c0d5b20400fbfb036f6350faa505ca Mon Sep 17 00:00:00 2001 From: JT Smith Date: Wed, 15 Sep 2010 15:00:46 -0500 Subject: [PATCH] aren't used, but don't want to delete --- bin/diffdb.pl | 30 ---------------------------- bin/{ => util}/get_building_stats.pl | 0 2 files changed, 30 deletions(-) delete mode 100644 bin/diffdb.pl rename bin/{ => util}/get_building_stats.pl (100%) diff --git a/bin/diffdb.pl b/bin/diffdb.pl deleted file mode 100644 index d1b6b4d7..00000000 --- a/bin/diffdb.pl +++ /dev/null @@ -1,30 +0,0 @@ -use strict; -use warnings; -use 5.010; -use DBI; -use Config::JSON; -use Text::Diff; -my $config = Config::JSON->new('/data/Lacuna-Server/etc/lacuna.conf'); -my $dev = DBI->connect($config->get('db/dsn'), $config->get('db/username'), $config->get('db/password')); -my $prod = DBI->connect('DBI:mysql:prod', $config->get('db/username'), $config->get('db/password')); - -my @dev_tables = @{$dev->selectcol_arrayref("show tables")}; -my @prod_tables = @{$prod->selectcol_arrayref("show tables")}; -foreach my $table_name (@dev_tables) { - say "TABLE: ".$table_name; - my $dev_table = get_table_definition($dev, $table_name); - my $prod_table = ''; - if ($table_name ~~ \@prod_tables) { - $prod_table = get_table_definition($prod, $table_name); - } - say diff \$prod_table, \$dev_table; -} - -$dev->disconnect; -$prod->disconnect; - - -sub get_table_definition { - my ($db, $name) = @_; - return $db->selectrow_arrayref("show create table $name")->[1]; -} diff --git a/bin/get_building_stats.pl b/bin/util/get_building_stats.pl similarity index 100% rename from bin/get_building_stats.pl rename to bin/util/get_building_stats.pl -- 2.51.2