view variant_effect_predictor/Bio/EnsEMBL/Variation/Pipeline/RebuildIndexes.pm @ 3:d30fa12e4cc5 default tip

Merge heads 2:a5976b2dce6f and 1:09613ce8151e which were created as a result of a recently fixed bug.
author devteam <devteam@galaxyproject.org>
date Mon, 13 Jan 2014 10:38:30 -0500
parents 1f6dce3d34e0
children
line wrap: on
line source

package Bio::EnsEMBL::Variation::Pipeline::RebuildIndexes;

use strict;
use warnings;

use base qw(Bio::EnsEMBL::Variation::Pipeline::BaseVariationProcess);

sub run {

    my $self = shift;
    
    my $tables = $self->param('tables');

    my $var_dba = $self->get_species_adaptor('variation');

    my $dbc = $var_dba->dbc;

    for my $table (@$tables) {
        $dbc->do("ALTER TABLE $table ENABLE KEYS")
            or warn "Failed to enable keys on $table";
    }
}

1;