Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Move _run_command method to mysql class

The Pg class doesn't need this at all
  • Loading branch information...
commit 7e559811e4040981cf9a1e508fe47d59de8890df 1 parent 2945eec
@autarch authored
Showing with 0 additions and 39 deletions.
  1. +0 −39 lib/Database/Migrator/Core.pm
View
39 lib/Database/Migrator/Core.pm
@@ -189,45 +189,6 @@ sub _run_one_migration {
return;
}
-sub _run_command {
- my $self = shift;
- my $command = shift;
- my $input = shift;
-
- my $stdout = q{};
- my $stderr = q{};
-
- my $handle_stdout = sub {
- $self->logger()->debug(@_);
-
- $stdout .= $_ for @_;
- };
-
- my $handle_stderr = sub {
- $self->logger()->debug(@_);
-
- $stderr .= $_ for @_;
- };
-
- $self->logger()->debug("Running command: [@{$command}]");
-
- return if $self->dry_run();
-
- run3( $command, \$input, $handle_stdout, $handle_stderr );
-
- if ($?) {
- my $exit = $? >> 8;
-
- my $msg = "@{$command} returned an exit code of $exit\n";
- $msg .= "\nSTDOUT:\n$stdout\n\n" if length $stdout;
- $msg .= "\nSTDERR:\n$stderr\n\n" if length $stderr;
-
- die $msg;
- }
-
- return $stdout;
-}
-
sub _build_pending_migrations {
my $self = shift;
Please sign in to comment.
Something went wrong with that request. Please try again.