diff options
author | ivan <ivan> | 2010-04-05 06:57:24 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-04-05 06:57:24 +0000 |
commit | cd42473fb7954363e9771895e699bed3d93aff48 (patch) | |
tree | 73eeacb64b9984cb82785d05b78f39bba0fd1547 /FS/bin/freeside-upgrade | |
parent | 467a00f309ef3ab7625cef8499886a1c2fc3353c (diff) |
require DBIx::DBSchema 0.39 for mysql
Diffstat (limited to 'FS/bin/freeside-upgrade')
-rwxr-xr-x | FS/bin/freeside-upgrade | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/FS/bin/freeside-upgrade b/FS/bin/freeside-upgrade index 97c704c91..f4ff1c28e 100755 --- a/FS/bin/freeside-upgrade +++ b/FS/bin/freeside-upgrade @@ -4,7 +4,7 @@ use strict; use vars qw($opt_d $opt_s $opt_q $opt_v $opt_r); use vars qw($DEBUG $DRY_RUN); use Getopt::Std; -use DBIx::DBSchema 0.31; +use DBIx::DBSchema 0.31; #0.39 use FS::UID qw(adminsuidsetup checkeuid datasrc driver_name); #getsecrets); use FS::CurrentUser; use FS::Schema qw( dbdef dbdef_dist reload_dbdef ); @@ -30,6 +30,11 @@ $FS::UID::callback_hack = 1; my $dbh = adminsuidsetup($user); $FS::UID::callback_hack = 0; +if ( driver_name =~ /^mysql/i ) { #until 0.39 is required above + eval "use DBIx::DBSchema 0.39;"; + die $@ if $@; +} + #needs to match FS::Schema... my $dbdef_file = "%%%FREESIDE_CONF%%%/dbdef.". datasrc; |