[freeside-commits] branch FREESIDE_3_BRANCH updated. 7e9c8df93590ae1319539626c540c97b9199beb0
Mark Wells
mark at 420.am
Thu Jul 17 12:59:03 PDT 2014
The branch, FREESIDE_3_BRANCH has been updated
via 7e9c8df93590ae1319539626c540c97b9199beb0 (commit)
from 6e004ea979eeb1059173781d2870bf410fa1e1ac (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 7e9c8df93590ae1319539626c540c97b9199beb0
Author: Mark Wells <mark at freeside.biz>
Date: Thu Jul 17 12:40:17 2014 -0700
mysql compat fix, try again, #28895
diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm
index aa5655d..139837c 100644
--- a/FS/FS/cust_pay.pm
+++ b/FS/FS/cust_pay.pm
@@ -9,7 +9,7 @@ use vars qw( $DEBUG $me $conf @encrypted_fields
use Date::Format;
use Business::CreditCard;
use Text::Template;
-use FS::UID qw( getotaker );
+use FS::UID qw( getotaker driver_name );
use FS::Misc qw( send_email );
use FS::Misc::DateTime qw( parse_datetime ); #for batch_import
use FS::Record qw( dbh qsearch qsearchs );
@@ -1077,9 +1077,10 @@ sub process_upgrade_paybatch {
###
# migrate batchnums from the misused 'paybatch' field to 'batchnum'
###
+ my $text = (driver_name =~ /^mysql/i) ? 'char' : 'text';
my $search = FS::Cursor->new( {
'table' => 'cust_pay',
- 'addl_from' => ' JOIN pay_batch ON cust_pay.paybatch = CONCAT(pay_batch.batchnum) ',
+ 'addl_from' => " JOIN pay_batch ON cust_pay.paybatch = CAST(pay_batch.batchnum AS $text) ",
} );
while (my $cust_pay = $search->fetch) {
$cust_pay->set('batchnum' => $cust_pay->paybatch);
-----------------------------------------------------------------------
Summary of changes:
FS/FS/cust_pay.pm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
More information about the freeside-commits
mailing list