Changeset 869 for trunk/Application


Ignore:
Timestamp:
Apr 1, 2020, 12:43:07 AM (5 years ago)
Author:
chronos
Message:
  • Added: New SpeedLimit table to support network speed limit groups.
Location:
trunk/Application
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/UpdateTrace.php

    r867 r869  
    20752075    KEY `Time` (`Time`)
    20762076  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;');
    2077 
     2077}
     2078
     2079function UpdateTo869($Manager)
     2080{
     2081  $Manager->Execute('CREATE TABLE IF NOT EXISTS `NetworkSpeedLimit` (
     2082    `Id` int(11) NOT NULL AUTO_INCREMENT,
     2083    `Name` varchar(255) CHARACTER SET utf8 NOT NULL,
     2084    `SpeedMaxOut` bigint(20) NOT NULL DEFAULT 0,
     2085    `SpeedMaxIn` bigint(20) NOT NULL DEFAULT 0,
     2086    `Parent` int(11) DEFAULT 0,
     2087    PRIMARY KEY (`Id`),
     2088    KEY `Parent` (`Parent`)
     2089  ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;');
     2090  $Manager->Execute('ALTER TABLE `ServiceCustomerRel` ADD COLUMN `SpeedLimit` INT NULL AFTER `ChangeReplaceId`, ADD INDEX `SpeedLimit` (`SpeedLimit`);');
     2091
     2092  // IS menu item
     2093  $Manager->Execute('INSERT INTO `Action` (`Id` ,`Name` ,`Title` ,`Type` ,`URL` ,
     2094    `Group` ,`Icon` ,`PermissionOperation` ,`Enable`) VALUES (
     2095    NULL , "", "Omezení rychlosti", "1", "/is/?t=NetworkSpeedLimit&a=list", NULL , NULL , NULL , "1");');
     2096  $ActionId = $Manager->Database->insert_id;
     2097  $DbResult = $Manager->Execute('SELECT `Id` FROM `MenuItem` WHERE `Name`="Síť"');
     2098  if($DbResult->num_rows > 0)
     2099  {
     2100    $DbRow = $DbResult->fetch_assoc();
     2101    $Manager->Execute("INSERT INTO `MenuItem` (`Id` ,`Name` ,`Parent` ,`Action` ,`Menu`) ".
     2102        "VALUES (NULL , 'Omezení rychlosti', ".$DbRow['Id'].", '".$ActionId."', '1');");
     2103  }
    20782104}
    20792105
     
    21762202      855 => array('Revision' => 862, 'Function' => 'UpdateTo862'),
    21772203      862 => array('Revision' => 867, 'Function' => 'UpdateTo867'),
     2204      867 => array('Revision' => 869, 'Function' => 'UpdateTo869'),
    21782205    ));
    21792206  }
  • trunk/Application/Version.php

    r868 r869  
    11<?php
    22
    3 $Revision = 868; // Subversion revision
    4 $DatabaseRevision = 867; // SQL structure revision
    5 $ReleaseTime = strtotime('2020-01-13');
     3$Revision = 869; // Subversion revision
     4$DatabaseRevision = 869; // SQL structure revision
     5$ReleaseTime = strtotime('2020-03-31');
Note: See TracChangeset for help on using the changeset viewer.