Changeset 9131

Show
Ignore:
Timestamp:
03/11/10 15:29:16 (2 years ago)
Author:
p_lindheimer
Message:

enable the outbound routes migration code re #4110

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/upgrades/2.8.0alpha1/tables.php

    r9102 r9131  
    22global $amp_conf; 
    33global $db; 
    4  
    5 // TODO: exit here for now. This will be migration code for new routes once the work is finished. 
    6 return true; 
    7  
    8 //TODO: DEBUG remove and restart for testing 
    9 // 
    10 $result = $db->query("DROP TABLE IF EXISTS `outbound_routes`"); 
    11 $result = $db->query("DROP TABLE IF EXISTS `outbound_route_patterns`"); 
    12 $result = $db->query("DROP TABLE IF EXISTS `outbound_route_trunks`"); 
    13 $result = $db->query("DROP TABLE IF EXISTS `outbound_route_sequence`"); 
    144 
    155$outbound_routes = " 
     
    122112        } 
    123113        // assumption here is that routepriorities always return in order, I think that is correct, which means we inserted in order 
    124         // TODO: update existing pinsets here whether enabled or not 
    125114        $seq = 0; 
    126115        $outbound_route_sequence = array(); 
     
    180169        } 
    181170 
     171        outn('Updating route sequence..'); 
    182172        $compiled = $db->prepare('INSERT INTO `outbound_route_sequence` (`route_id`, `seq`) values (?,?)'); 
    183173        $result = $db->executeMultiple($compiled,$outbound_route_sequence); 
    184174        if(DB::IsError($result)) { 
    185175          out("FATAL: ".$result->getDebugInfo()."\n".'error inserting into outbound_route_sequence table');  
     176        } else { 
     177          out("ok"); 
     178          outn('Removing old extenions table..'); 
     179          //TODO: add removal code once thoroughly tested 
     180          out("not implemented until thouroghly tested"); 
    186181        } 
    187182      }