Permalink
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (22 sloc) 640 Bytes
package Galileo::Command::author_tool;
use Mojo::Base 'Mojolicious::Command';
use DBIx::Class::DeploymentHandler;
sub run {
my $self = shift;
my $command = shift || 'generate_install_scripts';
my $method = $self->can($command) or die "No command: $command\n";
$self->$method();
}
sub generate_install_scripts {
my $self = shift;
my $schema = $self->app->schema;
my $dh = DBIx::Class::DeploymentHandler->new({
schema => $schema,
databases => [],
script_directory => 'lib/Galileo/files/sql',
});
my $version = $schema->schema_version;
say "generating deployment script";
$dh->prepare_install;
}
1;