Ignore:
Timestamp:
Jan 13, 2015, 12:18:19 AM (10 years ago)
Author:
chronos
Message:
  • Added: Scheduler available action table. Modules can register actions as read only items in table.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/Setup/Updates.php

    r729 r730  
    12071207 
    12081208  $Manager->Execute('INSERT INTO `Module` (`Id`, `Name`, `Title`) VALUES (NULL, "Plánovač", "Scheduler");');
     1209}
     1210
     1211function UpdateTo730($Manager)
     1212{
     1213        $Manager->Execute('CREATE TABLE IF NOT EXISTS `SchedulerAction` (
     1214  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1215  `Name` varchar(255) NOT NULL,
     1216  `Class` varchar(255) NOT NULL
     1217) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;');     
     1218        $Manager->Execute('ALTER TABLE `SchedulerAction` ADD PRIMARY KEY (`Id`);');
     1219       
     1220  $Manager->Execute('ALTER TABLE `Scheduler` CHANGE `Class` `Action` INT(11) NOT NULL;');
     1221  $Manager->Execute("ALTER TABLE `Scheduler` ADD INDEX ( `Action` ) ");
     1222  $Manager->Execute('ALTER TABLE `Scheduler` ADD CONSTRAINT `Schedule_ibfk_2` FOREIGN KEY (`Action`) REFERENCES `SchedulerAction` (`Id`);');
     1223  $Manager->Execute('INSERT INTO `SchedulerAction` (`Id`, `Name`, `Class`) VALUES (NULL, "Import bankovních účtů", "ScheduleBankImport");'); 
    12091224}
    12101225
     
    12711286        725 => array('Revision' => 726, 'Function' => 'UpdateTo726'),
    12721287        726 => array('Revision' => 729, 'Function' => 'UpdateTo729'),
     1288        729 => array('Revision' => 730, 'Function' => 'UpdateTo730'),
    12731289    ));
    12741290  }
Note: See TracChangeset for help on using the changeset viewer.