sub _build_schema_version { $_[0]->schema->schema_version }
method install {
- log_info { '[DBICDH] installing version ' . $self->to_version };
+ log_info { 'installing version ' . $self->to_version };
croak 'Install not possible as versions table already exists in database'
if $self->version_storage_is_installed;
}
sub upgrade {
- log_info { '[DBICDH] upgrading' };
+ log_info { 'upgrading' };
my $self = shift;
my $ran_once = 0;
while ( my $version_list = $self->next_version_set ) {
});
}
- log_warn { '[DBICDH] no need to run upgrade' } unless $ran_once;
+ log_warn { 'no need to run upgrade' } unless $ran_once;
}
sub downgrade {
- log_info { '[DBICDH] upgrading' };
+ log_info { 'upgrading' };
my $self = shift;
my $ran_once = 0;
while ( my $version_list = $self->previous_version_set ) {
# do we just delete a row here? I think so but not sure
$self->delete_database_version({ version => $version_list->[-1] });
}
- log_warn { '[DBICDH] no version to run downgrade' } unless $ran_once;
+ log_warn { 'no version to run downgrade' } unless $ran_once;
}
method backup {
- log_info { '[DBICDH] backing up' };
+ log_info { 'backing up' };
$self->storage->backup($self->backup_directory)
}
join '', grep { !/^--/ } split /\n/ # remove comments
} @$sql];
- Dlog_trace { "[DBICDH] Running SQL $_" } $sql;
+ Dlog_trace { "Running SQL $_" } $sql;
foreach my $line (@{$sql}) {
$storage->_query_start($line);
# the whole reason we do this is so that we can see the line that was run
}
method _run_sql($filename) {
- log_debug { "[DBICDH] Running SQL from $filename" };
+ log_debug { "Running SQL from $filename" };
return $self->_run_sql_array($self->_read_sql_file($filename));
}
method _run_perl($filename) {
- log_debug { "[DBICDH] Running Perl from $filename" };
+ log_debug { "Running Perl from $filename" };
my $filedata = do { local( @ARGV, $/ ) = $filename; <> };
no warnings 'redefine';
my $fn = eval "$filedata";
use warnings;
- Dlog_trace { "[DBICDH] Running Perl $_" } $fn;
+ Dlog_trace { "Running Perl $_" } $fn;
if ($@) {
carp "$filename failed to compile: $@";
sub deploy {
my $self = shift;
my $version = (shift @_ || {})->{version} || $self->schema_version;
- log_info { "[DBICDH] deploying version $version" };
+ log_info { "deploying version $version" };
return $self->_run_sql_and_perl($self->_ddl_schema_consume_filenames(
$self->storage->sqlt_type,
my $self = shift;
my $args = shift;
my $version = $args->{version} || $self->schema_version;
- log_info { "[DBICDH] preinstalling version $version" };
+ log_info { "preinstalling version $version" };
my $storage_type = $args->{storage_type} || $self->storage->sqlt_type;
my @files = @{$self->_ddl_preinstall_consume_filenames(
my ($self, $args) = @_;
my $source = $args->{result_source};
my $version = $args->{version};
- log_info { '[DBICDH] installing_resultsource ' . $source->source_name . ", version $version" };
+ log_info { 'installing_resultsource ' . $source->source_name . ", version $version" };
my $rs_install_file =
$self->_resultsource_install_filename($source->source_name);
sub prepare_resultsource_install {
my $self = shift;
my $source = (shift @_)->{result_source};
- log_info { '[DBICDH] preparing install for resultsource ' . $source->source_name };
+ log_info { 'preparing install for resultsource ' . $source->source_name };
my $filename = $self->_resultsource_install_filename($source->source_name);
$self->_prepare_install({
}
sub prepare_deploy {
- log_info { '[DBICDH] preparing deploy' };
+ log_info { 'preparing deploy' };
my $self = shift;
$self->_prepare_install({}, '_ddl_schema_produce_filename');
}
sub prepare_upgrade {
my ($self, $args) = @_;
log_info {
- '[DBICDH] preparing upgrade ' .
- "from $args->{from_version} to $args->{to_version}"
+ "preparing upgrade from $args->{from_version} to $args->{to_version}"
};
$self->_prepare_changegrade(
$args->{from_version}, $args->{to_version}, $args->{version_set}, 'up'
sub prepare_downgrade {
my ($self, $args) = @_;
log_info {
- '[DBICDH] preparing downgrade ' .
- "from $args->{from_version} to $args->{to_version}"
+ "preparing downgrade from $args->{from_version} to $args->{to_version}"
};
$self->_prepare_changegrade(
$args->{from_version}, $args->{to_version}, $args->{version_set}, 'down'
sub downgrade_single_step {
my $self = shift;
my $version_set = (shift @_)->{version_set};
- Dlog_info { qq([DBICDH] downgrade_single_step'ing $_) } $version_set;
+ Dlog_info { "downgrade_single_step'ing $_" } $version_set;
my $sql = $self->_run_sql_and_perl($self->_ddl_schema_down_consume_filenames(
$self->storage->sqlt_type,
sub upgrade_single_step {
my $self = shift;
my $version_set = (shift @_)->{version_set};
- Dlog_info { qq([DBICDH] upgrade_single_step'ing $_) } $version_set;
+ Dlog_info { "upgrade_single_step'ing $_" } $version_set;
my $sql = $self->_run_sql_and_perl($self->_ddl_schema_up_consume_filenames(
$self->storage->sqlt_type,