[freeside-commits] freeside/FS/FS cust_main.pm,1.554,1.555

Mark Wells mark at wavetail.420.am
Wed Sep 29 11:39:07 PDT 2010


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv9801

Modified Files:
	cust_main.pm 
Log Message:
restore missing signup dates during upgrade, RT#9972

Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.554
retrieving revision 1.555
diff -u -w -d -r1.554 -r1.555
--- cust_main.pm	22 Sep 2010 21:22:03 -0000	1.554
+++ cust_main.pm	29 Sep 2010 18:39:04 -0000	1.555
@@ -4609,9 +4609,13 @@
 sub _upgrade_data { #class method
   my ($class, %opts) = @_;
 
-  my $sql = 'UPDATE h_cust_main SET paycvv = NULL WHERE paycvv IS NOT NULL';
+  foreach my $sql (
+    'UPDATE h_cust_main SET paycvv = NULL WHERE paycvv IS NOT NULL',
+    'UPDATE cust_main SET signupdate = (SELECT signupdate FROM h_cust_main WHERE h_cust_main.custnum = cust_main.custnum ORDER BY historynum ASC LIMIT 1) WHERE signupdate IS NULL',
+  ) {
   my $sth = dbh->prepare($sql) or die dbh->errstr;
   $sth->execute or die $sth->errstr;
+  }
 
   local($ignore_expired_card) = 1;
   local($ignore_illegal_zip) = 1;



More information about the freeside-commits mailing list