svc_cable, RT#22009
[freeside.git] / FS / FS / Upgrade.pm
index d00bb5c..14527f9 100644 (file)
@@ -7,6 +7,7 @@ use Tie::IxHash;
 use FS::UID qw( dbh driver_name );
 use FS::Conf;
 use FS::Record qw(qsearchs qsearch str2time_sql);
+use FS::upgrade_journal;
 
 use FS::svc_domain;
 $FS::svc_domain::whois_hack = 1;
@@ -63,6 +64,19 @@ sub upgrade_config {
   upgrade_overlimit_groups($conf);
   map { upgrade_overlimit_groups($conf,$_->agentnum) } qsearch('agent', {});
   
+  # change 'fslongtable' to 'longtable'
+  # in invoice main template, and also in all secondary invoice templates
+  my @latex_confs =
+  qsearch('conf', { 'name' => {op=>'LIKE', value=>'%latex%'} });
+
+  foreach my $c (@latex_confs) {
+    my $value = $c->value;
+    if (length($value) and $value =~ /fslongtable/) {
+      $value =~ s/fslongtable/longtable/g;
+      $conf->set($c->name, $value, $c->agentnum);
+    }
+  }
+
 }
 
 sub upgrade_overlimit_groups {
@@ -264,7 +278,10 @@ sub upgrade_data {
     'part_export'      => [],
 
     #insert default tower_sector if not present
-    'tower',
+    'tower' => [],
+
+    #routernum/blocknum
+    'svc_broadband' => [],
   ;
 
   \%hash;