3 #This drops anything from the database that could cause live things to happen.
4 #You'd want to do this on a test copy of your live database but NEVER on the
7 #-all exports (all records in part_export, part_export_option export_svc)
8 #-all non-POST invoice destinations (cust_main_invoice)
9 #-all payment gateways and agent payment gw overrides (payment_gateway,
10 # payment_gateway_option, agent_payment_gateway)
11 #-everything in the job queue (queue and queue_arg)
12 #-business-onlinepayment and business-onlinepayment-ach config
15 use FS::UID qw(adminsuidsetup dbh);
20 foreach my $table (qw(
25 payment_gateway_option
31 my $sth = dbh->prepare("DELETE FROM $table") or die dbh->errstr;
32 $sth->execute or die $sth->errstr;
36 my $dsth = dbh->prepare("DELETE FROM cust_main_invoice WHERE dest != 'POST'")
38 $dsth->execute or die $dsth->errstr;
40 my $conf = new FS::Conf;
42 business-onlinepayment
43 business-onlinepayment-ach
48 dbh->commit or die dbh->errstr;