Changeset 9131
- Timestamp:
- 03/11/10 15:29:16 (2 years ago)
- Files:
-
- freepbx/trunk/upgrades/2.8.0alpha1/tables.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/trunk/upgrades/2.8.0alpha1/tables.php
r9102 r9131 2 2 global $amp_conf; 3 3 global $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 testing9 //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`");14 4 15 5 $outbound_routes = " … … 122 112 } 123 113 // 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 not125 114 $seq = 0; 126 115 $outbound_route_sequence = array(); … … 180 169 } 181 170 171 outn('Updating route sequence..'); 182 172 $compiled = $db->prepare('INSERT INTO `outbound_route_sequence` (`route_id`, `seq`) values (?,?)'); 183 173 $result = $db->executeMultiple($compiled,$outbound_route_sequence); 184 174 if(DB::IsError($result)) { 185 175 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"); 186 181 } 187 182 }
