web/modules/rhn/RHN/DB/SatInstall.pm | 33 --------------------------------- 1 file changed, 33 deletions(-)
New commits: commit 8d28b8155c4476c432abb9d71fe14d1b4d3750c7 Author: Jan Pazdziora jpazdziora@redhat.com Date: Wed Jan 19 16:05:51 2011 +0100
Removing RHN::DB::SatInstall::clear_db, it was last referenced by rhn-populate-database.pl.
diff --git a/web/modules/rhn/RHN/DB/SatInstall.pm b/web/modules/rhn/RHN/DB/SatInstall.pm index e65f789..fa43a33 100644 --- a/web/modules/rhn/RHN/DB/SatInstall.pm +++ b/web/modules/rhn/RHN/DB/SatInstall.pm @@ -71,39 +71,6 @@ EOQ return %nls_database_parameters; }
-sub clear_db { - my $class = shift; - - my $dbh = RHN::DB->connect; - - if (grep { $dbh->{Name} eq $_ } qw/webdev webqa web phx live prod/) { - throw "No! Attempt to clear db: '" . $dbh->{Name} . "'\n"; - } - - my $select_sth = $dbh->prepare(<<EOQ); - SELECT 'drop ' || UO.object_type ||' '|| UO.object_name AS DROP_STMT - FROM user_objects UO - WHERE UO.object_type NOT IN ('TABLE', 'INDEX', 'TRIGGER', 'LOB') -UNION - SELECT 'drop ' || UO.object_type ||' '|| UO.object_name - || ' cascade constraints' AS DROP_STMT - FROM user_objects UO - WHERE UO.object_type = 'TABLE' - AND UO.object_name NOT LIKE '%$%' -EOQ - - $select_sth->execute(); - - while (my ($drop_stmt) = $select_sth->fetchrow()) { - my $drop_sth = $dbh->prepare($drop_stmt); - $drop_sth->execute(); - } - - $dbh->commit; - - return; -} - sub update_monitoring_config { my $class = shift; my $mon_config = shift;
spacewalk-commits@lists.fedorahosted.org