Ignore:
Timestamp:
Jan 17, 2016, 6:19:06 PM (9 years ago)
Author:
chronos
Message:
  • Added: Prepared database tables for import module. Every executed import should be recorded and should be allowed to remove it.
  • Modified: More translatable strings.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/UpdateTrace.php

    r848 r849  
    29002900}
    29012901
     2902function UpdateTo849($Manager)
     2903{
     2904  // Group item names
     2905  $Manager->Execute('CREATE TABLE IF NOT EXISTS `Import` (
     2906    `Id` int(11) NOT NULL AUTO_INCREMENT,
     2907    `ClientVersion` int(11) NOT NULL,
     2908    `Time` datetime NOT NULL,
     2909    `User` int(11) NOT NULL,
     2910    PRIMARY KEY (`Id`),
     2911    KEY (`User`),
     2912    KEY (`ClientVersion`)
     2913    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;');
     2914  $Manager->Execute('ALTER TABLE `Import` ADD FOREIGN KEY (`ClientVersion`) REFERENCES `ClientVersion`(`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT;');
     2915  $Manager->Execute('ALTER TABLE `Import` ADD FOREIGN KEY (`User`) REFERENCES `User`(`ID`) ON DELETE RESTRICT ON UPDATE RESTRICT;');
     2916  $Manager->Execute('CREATE TABLE IF NOT EXISTS `ImportGroup` (
     2917    `Id` int(11) NOT NULL AUTO_INCREMENT,
     2918    `Import` int(11) NOT NULL,
     2919    `Group` int(11) NOT NULL,
     2920    PRIMARY KEY (`Id`),
     2921    KEY (`Import`),
     2922    KEY (`Group`)
     2923    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;');
     2924  $Manager->Execute('ALTER TABLE `ImportGroup` ADD FOREIGN KEY (`Import`) REFERENCES `Import`(`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT;');
     2925  $Manager->Execute('ALTER TABLE `ImportGroup` ADD FOREIGN KEY (`Group`) REFERENCES `Group`(`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT;');
     2926}
     2927
     2928
    29022929$Updates = array(
    29032930  498 => array('Revision' => 506, 'Function' => 'UpdateTo506'),
     
    29302957  811 => array('Revision' => 846, 'Function' => 'UpdateTo846'),
    29312958  846 => array('Revision' => 848, 'Function' => 'UpdateTo848'),
     2959  848 => array('Revision' => 849, 'Function' => 'UpdateTo849'),
    29322960);
Note: See TracChangeset for help on using the changeset viewer.