Changeset 729 for trunk/Common/Setup/Updates.php
- Timestamp:
- Jan 12, 2015, 12:20:30 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Setup/Updates.php
r726 r729 1170 1170 1171 1171 $Manager->Execute('ALTER TABLE `MemberPayment` DROP `NetworkDevice`;'); 1172 } 1173 1174 function UpdateTo729($Manager) 1175 { 1176 $Manager->Execute('ALTER TABLE `FinanceBankAccount` ADD `AutoImport` INT NOT NULL ;'); 1177 1178 $Manager->Execute('CREATE TABLE IF NOT EXISTS `Scheduler` ( 1179 `Id` int(11) NOT NULL, 1180 `Name` varchar(255) NOT NULL, 1181 `Enabled` int(11) NOT NULL, 1182 `Class` varchar(255) NOT NULL, 1183 `Log` mediumtext NOT NULL, 1184 `LastExecutedTime` datetime DEFAULT NULL, 1185 `ScheduledTime` datetime NOT NULL, 1186 `Period` int(11) NOT NULL 1187 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;'); 1188 1189 $Manager->Execute('ALTER TABLE `Scheduler` 1190 ADD PRIMARY KEY (`Id`);'); 1191 1192 $Manager->Execute('ALTER TABLE `Scheduler` 1193 MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT;'); 1194 1195 // IS menu item 1196 $Manager->Execute('INSERT INTO `Action` (`Id` ,`Name` ,`Title` ,`Type` ,`URL` , 1197 `Group` ,`Icon` ,`PermissionOperation` ,`Enable`) VALUES ( 1198 NULL , "", "Plánovač", "1", "/is/?t=Scheduler&a=list", NULL , NULL , NULL , "1");'); 1199 $ActionId = $Manager->Database->insert_id; 1200 $DbResult = $Manager->Execute('SELECT `Id` FROM `MenuItem` WHERE `Name`="Systém"'); 1201 if($DbResult->num_rows > 0) 1202 { 1203 $DbRow = $DbResult->fetch_assoc(); 1204 $Manager->Execute("INSERT INTO `MenuItem` (`Id` ,`Name` ,`Parent` ,`Action` ,`Menu`) ". 1205 "VALUES (NULL , 'Plánovač', ".$DbRow['Id'].", '".$ActionId."', '1');"); 1206 } 1207 1208 $Manager->Execute('INSERT INTO `Module` (`Id`, `Name`, `Title`) VALUES (NULL, "Plánovač", "Scheduler");'); 1172 1209 } 1173 1210 … … 1233 1270 722 => array('Revision' => 725, 'Function' => 'UpdateTo725'), 1234 1271 725 => array('Revision' => 726, 'Function' => 'UpdateTo726'), 1272 726 => array('Revision' => 729, 'Function' => 'UpdateTo729'), 1235 1273 )); 1236 1274 }
Note:
See TracChangeset
for help on using the changeset viewer.