X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FUpgrade.pm;h=f559d2e0a44adcfb4f2d670a689b6ea3fb404556;hb=7c1cc70e0d76ab8a26fc3b9dca8f20978c71e3d8;hp=fea53a235eca550df2894a5fc52c4304dabfd2f8;hpb=95cef2cea4c98d8fde7f58bacce3cf1da955c1a0;p=freeside.git diff --git a/FS/FS/Upgrade.pm b/FS/FS/Upgrade.pm index fea53a235..f559d2e0a 100644 --- a/FS/FS/Upgrade.pm +++ b/FS/FS/Upgrade.pm @@ -86,11 +86,16 @@ sub upgrade_config { # if there's a USPS tools login, assume that's the standardization method # you want to use - if ( length($conf->config('usps_webtools-userid')) > 0 and - !$conf->exists('address_standardize_method') ) { - $conf->set('address_standardize_method', 'usps'); + $conf->set('address_standardize_method', 'usps') + if $conf->exists('usps_webtools-userid') + && length($conf->config('usps_webtools-userid')) > 0 + && ! $conf->exists('address_standardize_method'); + + # this option has been renamed/expanded + if ( $conf->exists('cust_main-enable_spouse_birthdate') ) { + $conf->touch('cust_main-enable_spouse'); + $conf->delete('cust_main-enable_spouse_birthdate'); } - } sub upgrade_overlimit_groups { @@ -132,6 +137,9 @@ sub upgrade { local $FS::UID::AutoCommit = 0; local $FS::UID::AutoCommit = 0; + local $FS::cust_pkg::upgrade = 1; #go away after setup+start dates cleaned up for old customers + + foreach my $table ( keys %$data ) { my $class = "FS::$table"; @@ -294,6 +302,9 @@ sub upgrade_data { #insert default tower_sector if not present 'tower' => [], + #repair improperly deleted services + 'cust_svc' => [], + #routernum/blocknum 'svc_broadband' => [],