[freeside-commits] freeside/bin fs-migrate-cust_tax_exempt, 1.1, 1.2 h_cust_main-wipe_paycvv, NONE, 1.1
Ivan,,,
ivan at wavetail.420.am
Fri Apr 17 16:30:59 PDT 2009
Update of /home/cvs/cvsroot/freeside/bin
In directory wavetail.420.am:/tmp/cvs-serv8557
Modified Files:
fs-migrate-cust_tax_exempt
Added Files:
h_cust_main-wipe_paycvv
Log Message:
something to wipe the CVV from very large databases
Index: fs-migrate-cust_tax_exempt
===================================================================
RCS file: /home/cvs/cvsroot/freeside/bin/fs-migrate-cust_tax_exempt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- fs-migrate-cust_tax_exempt 3 Apr 2007 01:39:06 -0000 1.1
+++ fs-migrate-cust_tax_exempt 17 Apr 2009 23:30:57 -0000 1.2
@@ -23,7 +23,7 @@
#site-specific rewrites
my %rewrite = (
#cust_tax_exempt.exemptnum => { 'field' => 'newvalue', ... },
- '23' => { month=>10, year=>2005, invnum=>1640 },
+# '23' => { month=>10, year=>2005, invnum=>1640 },
#etc.
);
--- NEW FILE: h_cust_main-wipe_paycvv ---
#!/usr/bin/perl
use strict;
use FS::UID qw(adminsuidsetup dbh);
use FS::Record; #buh?
my $user = shift or die 'usage';
adminsuidsetup $user;
while (1) {
my $sql = ' UPDATE h_cust_main SET paycvv = NULL
WHERE historynum IN ( SELECT historynum FROM h_cust_main
WHERE paycvv IS NOT NULL LIMIT 8192 )';
# WHERE paycvv IS NOT NULL LIMIT 1 )';
my $sth = dbh->prepare($sql) or die dbh->errstr;
print '.'; $|=1;
my $rv = $sth->execute;
dbh->commit or die dbh->errstr;
last if $rv == 0;
}
print "\n";
More information about the freeside-commits
mailing list