[freeside-commits] branch master updated. 2029d3997a6c795a55bb869298b08958fab4ee56
Ivan
ivan at 420.am
Sat Oct 19 22:54:56 PDT 2013
The branch, master has been updated
via 2029d3997a6c795a55bb869298b08958fab4ee56 (commit)
from ecc15d03711690d2b2aeeda2bd8ff1119956c583 (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 2029d3997a6c795a55bb869298b08958fab4ee56
Author: Ivan Kohler <ivan at freeside.biz>
Date: Sat Oct 19 22:54:51 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 06ec962..893f5d4 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);
@@ -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