[freeside-commits] freeside/FS/bin freeside-upgrade,1.31,1.31.2.1
Ivan,,,
ivan at wavetail.420.am
Mon Dec 28 20:24:06 PST 2009
Update of /home/cvs/cvsroot/freeside/FS/bin
In directory wavetail.420.am:/tmp/cvs-serv11815
Modified Files:
Tag: FREESIDE_1_9_BRANCH
freeside-upgrade
Log Message:
don't change h_queue.job type under non-mysql, takes forever on large dbs, RT#6946
Index: freeside-upgrade
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/bin/freeside-upgrade,v
retrieving revision 1.31
retrieving revision 1.31.2.1
diff -u -d -r1.31 -r1.31.2.1
--- freeside-upgrade 10 Jun 2009 03:06:21 -0000 1.31
+++ freeside-upgrade 29 Dec 2009 04:24:04 -0000 1.31.2.1
@@ -5,7 +5,7 @@
use vars qw($DEBUG $DRY_RUN);
use Getopt::Std;
use DBIx::DBSchema 0.31;
-use FS::UID qw(adminsuidsetup checkeuid datasrc ); #getsecrets);
+use FS::UID qw(adminsuidsetup checkeuid datasrc driver_name); #getsecrets);
use FS::CurrentUser;
use FS::Schema qw( dbdef dbdef_dist reload_dbdef );
use FS::Misc::prune qw(prune_applications);
@@ -61,9 +61,16 @@
#you'll lose all the part_svc settings it migrates to part_svc_column
my @statements =
- grep { $_ !~ /^CREATE +INDEX +h_queue/ } #useless, holds up queue insertion
+ grep { $_ !~ /^CREATE +INDEX +h_queue/i } #useless, holds up queue insertion
dbdef->sql_update_schema( dbdef_dist(datasrc), $dbh );
+unless ( driver_name =~ /^mysql/i ) {
+ #not necessary under non-mysql, takes forever on big db
+ @statements =
+ grep { $_ !~ /^ *ALTER +TABLE +h_queue +ALTER +COLUMN +job +TYPE +varchar\(512\) *$/ }
+ @statements;
+}
+
if ( $DRY_RUN ) {
print
join(";\n", @bugfix, @statements ). ";\n";
More information about the freeside-commits
mailing list