[freeside-commits] branch master updated. 5259890066c6a6dc90048b209cfb86550d5336a4

Ivan ivan at 420.am
Thu Dec 10 11:10:12 PST 2015


The branch, master has been updated
       via  5259890066c6a6dc90048b209cfb86550d5336a4 (commit)
      from  083055aebf83987941affc4da3184dec0f27d2ae (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 5259890066c6a6dc90048b209cfb86550d5336a4
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu Dec 10 11:10:09 2015 -0800

    don't auto-add the column under non-mysql, RT#39250

diff --git a/FS/bin/freeside-cdr-asterisk_sql b/FS/bin/freeside-cdr-asterisk_sql
index 160780b..5c90ab4 100755
--- a/FS/bin/freeside-cdr-asterisk_sql
+++ b/FS/bin/freeside-cdr-asterisk_sql
@@ -26,16 +26,18 @@ adminsuidsetup $user;
 
 my $fsdbh = FS::UID::dbh;
 
-# check for existence of freesidestatus
 my $table = $opt{T} || 'cdr';
-my $status = $dbi->selectall_arrayref("SHOW COLUMNS FROM $table WHERE Field = 'freesidestatus'");
-if( ! @$status ) {
-  print "Adding freesidestatus column...\n";
-  $dbi->do("ALTER TABLE $table ADD COLUMN freesidestatus varchar(32)")
-    or die $dbi->errstr;
-}
-else {
-  print "freesidestatus column present\n";
+
+# check for existence of freesidestatus
+if ( $engine =~ /^mysql/ ) {
+  my $status = $dbi->selectall_arrayref("SHOW COLUMNS FROM $table WHERE Field = 'freesidestatus'");
+  if( ! @$status ) {
+    print "Adding freesidestatus column...\n";
+    $dbi->do("ALTER TABLE $table ADD COLUMN freesidestatus varchar(32)")
+      or die $dbi->errstr;
+  } else {
+    print "freesidestatus column present\n";
+  }
 }
 
 my @cols = ( qw( 

-----------------------------------------------------------------------

Summary of changes:
 FS/bin/freeside-cdr-asterisk_sql |   20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)




More information about the freeside-commits mailing list