[freeside-commits] branch FREESIDE_4_BRANCH updated. 3bb1455dbe349c3e03c80e80ceeb059993d1ef10
Ivan
ivan at 420.am
Thu Dec 10 11:10:15 PST 2015
The branch, FREESIDE_4_BRANCH has been updated
via 3bb1455dbe349c3e03c80e80ceeb059993d1ef10 (commit)
from 457f1c94eca83b791ea4bfcb8cd43f8feeb7831c (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 3bb1455dbe349c3e03c80e80ceeb059993d1ef10
Author: Ivan Kohler <ivan at freeside.biz>
Date: Thu Dec 10 11:10:12 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