- if ($filename =~ m/sql$/) {
- $self->process_query($dbh, $filename, $version_or_control, $db_charset);
- } else {
- $self->process_perl_script($dbh, $filename, $version_or_control, $db_charset);
- }
-}
-
-sub update_available {
- my ($self, $cur_version) = @_;
-
- local *SQLDIR;
-
- my $dbdriver = $self->{dbdriver};
- opendir SQLDIR, "sql/${dbdriver}-upgrade" || error("", "sql/${dbdriver}-upgrade: $!");
- my @upgradescripts = grep /${dbdriver}-upgrade-\Q$cur_version\E.*\.(sql|pl)$/, readdir SQLDIR;
- closedir SQLDIR;
-
- return ($#upgradescripts > -1);