Changeset 734


Ignore:
Timestamp:
Mar 15, 2015, 10:42:57 AM (10 years ago)
Author:
chronos
Message:
  • Fixed: Databae upgrade script.
File:
1 edited

Legend:

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

    r731 r734  
    12141214  `Id` int(11) NOT NULL AUTO_INCREMENT,
    12151215  `Name` varchar(255) NOT NULL,
    1216   `Class` varchar(255) NOT NULL
     1216  `Class` varchar(255) NOT NULL,
     1217        PRIMARY KEY (`Id`)
    12171218) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;');     
    1218         $Manager->Execute('ALTER TABLE `SchedulerAction` ADD PRIMARY KEY (`Id`);');
    1219        
    12201219  $Manager->Execute('ALTER TABLE `Scheduler` CHANGE `Class` `Action` INT(11) NOT NULL;');
    12211220  $Manager->Execute("ALTER TABLE `Scheduler` ADD INDEX ( `Action` ) ");
     1221  $Manager->Execute('INSERT INTO `SchedulerAction` (`Id`, `Name`, `Class`) VALUES (NULL, "Import bankovních účtů", "ScheduleBankImport");');
     1222  $Manager->Execute('UPDATE `Scheduler` SET `Action` = 1 WHERE `Scheduler`.`Id` = 1;');
    12221223  $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");'); 
    12241224}
    12251225
Note: See TracChangeset for help on using the changeset viewer.