Changeset 80 for trunk/Application/UpdateTrace.php
- Timestamp:
- Dec 31, 2016, 8:56:00 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/UpdateTrace.php
r69 r80 58 58 } 59 59 60 function UpdateTo79($Manager) 61 { 62 $DbResult = $Manager->Execute('SELECT `DataTable`,`DataType` FROM `Measure`;'); 63 while($Measure = $DbResult->fetch_assoc()) 64 { 65 $Table = $Measure['DataTable']; 66 $Type = $Measure['DataType']; 67 $Manager->Execute('ALTER TABLE `'.$Table.'` CHANGE `time` `Time` DATETIME NULL DEFAULT NULL;'); 68 $Manager->Execute('ALTER TABLE `'.$Table.'` CHANGE `measure` `Measure` SMALLINT(11) NOT NULL DEFAULT "0";'); 69 $Manager->Execute('ALTER TABLE `'.$Table.'` CHANGE `min` `Min` '.$Type.' NOT NULL DEFAULT "0"'); 70 $Manager->Execute('ALTER TABLE `'.$Table.'` CHANGE `avg` `Avg` '.$Type.' NOT NULL DEFAULT "0"'); 71 $Manager->Execute('ALTER TABLE `'.$Table.'` CHANGE `max` `Max` '.$Type.' NOT NULL DEFAULT "0"'); 72 $Manager->Execute('ALTER TABLE `'.$Table.'` CHANGE `continuity` `Continuity` TINYINT(1) NOT NULL DEFAULT "0"'); 73 $Manager->Execute('ALTER TABLE `'.$Table.'` CHANGE `level` `Level` TINYINT(4) NOT NULL DEFAULT "0"'); 74 } 75 } 76 60 77 class Updates 61 78 { … … 64 81 return(array( 65 82 65 => array('Revision' => 67, 'Function' => 'UpdateTo67'), 83 67 => array('Revision' => 79, 'Function' => 'UpdateTo79'), 66 84 )); 67 85 }
Note:
See TracChangeset
for help on using the changeset viewer.