let's not name these differently than the emig.d/ counterparts
[migration-tools.git] / kmig.d / bin / kmig-init
diff --git a/kmig.d/bin/kmig-init b/kmig.d/bin/kmig-init
deleted file mode 100755 (executable)
index 7557168..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/perl -w
-###############################################################################
-=pod
-
-=head1 NAME
-
-kmig-init - This will add or recreate tracking tables for the B<kmig> toolset
-to the database specified by the current kmig environment.
-
-In practice, you should invoke 'kmig env use schema_name' prior to calling
-B<init>
-
-=head1 SYNOPSIS
-
-B<kmig-init>
-
-B<kmig-init> <help>
-
-=cut
-
-###############################################################################
-
-use strict;
-use Switch;
-use Env qw(
-    HOME MYSQL_HOST MYSQL_TCP_PORT MYSQL_USER MYSQL_DATABASE MYSQL_PW
-    MIGSCHEMA MIGBASEWORKDIR MIGBASEGITDIR MIGGITDIR MIGWORKDIR
-);
-use Pod::Usage;
-use DBI;
-use FindBin;
-my $mig_bin = "$FindBin::Bin/";
-my $mig_sql = $mig_bin . "../sql/init/";
-use lib "$FindBin::Bin/";
-use KMig;
-
-pod2usage(-verbose => 2) if $ARGV[0];
-
-KMig::die_if_no_env_migschema();
-
-if (! KMig::check_for_db_migschema()) {
-    die "could not find the schema";
-}
-
-KMig::die_if_mig_tracking_table_exists();
-KMig::die_if_mig_column_tracking_table_exists();
-loop_through_mig_sql_templates();
-
-exit 0;
-
-###############################################################################
-
-sub loop_through_mig_sql_templates {
-    print "Looping through kmig.d/sql/init/ templates\n";
-    opendir my $dir, $mig_sql or die "Cannot open directory: $!";
-    my @files = sort readdir $dir;
-    closedir $dir;
-    foreach my $file (@files) {
-        if ($file =~ /.sql$/) {
-            print "executing $file:\n";
-            system( $mig_bin . "kmig-sql", ('-e',"source $mig_sql$file") )
-        }
-    }
-}
-