[freeside-commits] freeside/FS/FS cust_main.pm, 1.464.2.47, 1.464.2.48

Mark Wells mark at wavetail.420.am
Wed Sep 29 11:41:38 PDT 2010


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

Modified Files:
      Tag: FREESIDE_1_9_BRANCH
	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.464.2.47
retrieving revision 1.464.2.48
diff -u -w -d -r1.464.2.47 -r1.464.2.48
--- cust_main.pm	24 Sep 2010 03:15:09 -0000	1.464.2.47
+++ cust_main.pm	29 Sep 2010 18:41:36 -0000	1.464.2.48
@@ -9803,9 +9803,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;
+  }
 
 }
 



More information about the freeside-commits mailing list