[freeside-commits] branch FREESIDE_3_BRANCH updated. 556096168f538ad797a8a56f0a430b37e67ee1de
Ivan
ivan at 420.am
Sat Oct 19 22:31:16 PDT 2013
The branch, FREESIDE_3_BRANCH has been updated
via 556096168f538ad797a8a56f0a430b37e67ee1de (commit)
from 05ec2947cad878676ca80ede4a1a25235c76621a (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 556096168f538ad797a8a56f0a430b37e67ee1de
Author: Ivan Kohler <ivan at freeside.biz>
Date: Sat Oct 19 22:31:15 2013 -0700
add -c flag to skip cdr and h_cdr updates, RT#21464
diff --git a/FS/bin/freeside-upgrade b/FS/bin/freeside-upgrade
index 44e67df..9b57316 100755
--- a/FS/bin/freeside-upgrade
+++ b/FS/bin/freeside-upgrade
@@ -1,8 +1,8 @@
#!/usr/bin/perl -w
use strict;
-use vars qw($opt_d $opt_s $opt_q $opt_v $opt_r);
-use vars qw($DEBUG $DRY_RUN);
+use vars qw( $opt_d $opt_s $opt_q $opt_v $opt_r $opt_c );
+use vars qw( $DEBUG $DRY_RUN );
use Getopt::Std;
use DBIx::DBSchema 0.31; #0.39
use FS::UID qw(adminsuidsetup checkeuid datasrc driver_name); #getsecrets);
@@ -17,7 +17,7 @@ my $start = time;
die "Not running uid freeside!" unless checkeuid();
-getopts("dqrs");
+getopts("dqrcs");
$DEBUG = !$opt_q;
#$DEBUG = $opt_v;
@@ -154,6 +154,12 @@ unless ( driver_name =~ /^mysql/i ) {
@statements;
}
+if ( $opt_c ) {
+ @statements =
+ grep { $_ !~ /^ *ALTER +TABLE +(h_)?cdr /i }
+ @statements;
+}
+
if ( $DRY_RUN ) {
print
join(";\n", @statements ). ";\n";
@@ -312,7 +318,7 @@ freeside-upgrade - Upgrades database schema for new freeside verisons.
=head1 SYNOPSIS
- freeside-upgrade [ -d ] [ -r ] [ -s ] [ -q | -v ]
+ freeside-upgrade [ -d ] [ -r ] [ c ] [ -s ] [ -q | -v ]
=head1 DESCRIPTION
@@ -337,6 +343,8 @@ Also performs other upgrade functions:
[ -r ]: Skip sqlradius updates. Useful for occassions where the sqlradius
databases may be inaccessible.
+ [ -c ]: Skip cdr and h_cdr updates.
+
[ -v ]: Run verbosely, sending debugging information to STDERR. This is the
current default.
-----------------------------------------------------------------------
Summary of changes:
FS/bin/freeside-upgrade | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
More information about the freeside-commits
mailing list