-sub update_available {
- my ($self, $cur_version) = @_;
-
- local *SQLDIR;
-
- opendir SQLDIR, "sql/Pg-upgrade" || error("", "sql/Pg-upgrade: $!");
- my @upgradescripts = grep /Pg-upgrade-\Q$cur_version\E.*\.(sql|pl)$/, readdir SQLDIR;
- closedir SQLDIR;
-
- return ($#upgradescripts > -1);
-}
-
-sub update2_available {
- $::lxdebug->enter_sub();
-
- my ($self, $dbh) = @_;
-
- map { $_->{applied} = 0; } values %{ $self->{all_controls} };
-
- my $sth = $dbh->prepare(qq|SELECT tag FROM | . $self->{schema} . qq|schema_info|);
- if ($sth->execute) {
- while (my ($tag) = $sth->fetchrow_array) {
- $self->{all_controls}->{$tag}->{applied} = 1 if defined $self->{all_controls}->{$tag};
- }
- }
- $sth->finish();
+sub process_file {
+ my ($self, $dbh, $filename, $version_or_control) = @_;