Ignore:
Timestamp:
May 23, 2015, 12:07:08 AM (9 years ago)
Author:
chronos
Message:
File:
1 edited

Legend:

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

    r738 r739  
    13431343  $Manager->Execute('ALTER TABLE `NetworkLinkType`
    13441344MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT;');
     1345}
     1346
     1347function UpdateTo739($Manager)
     1348{
     1349  $Manager->Execute('ALTER TABLE `NetworkDomain` ADD KEY (`Parent`);');
     1350  $Manager->Execute('ALTER TABLE `NetworkDomain` ADD FOREIGN KEY (`Parent`) REFERENCES `NetworkDomain`(`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT;');
     1351
     1352  $Manager->Execute('CREATE TABLE IF NOT EXISTS `NetworkDomainServer` (
     1353  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1354  `Address` varchar(255) NOT NULL,
     1355  `Domain` int(11) NOT NULL,
     1356  `Sequence` int(11) NOT NULL
     1357) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;');
     1358
     1359  $Manager->Execute('ALTER TABLE `NetworkDomainServer`
     1360 ADD PRIMARY KEY (`Id`), ADD KEY `Domain` (`Domain`);');
     1361
     1362  $Manager->Execute('ALTER TABLE `NetworkDomainServer`
     1363ADD CONSTRAINT `NetworkDomainServer_ibfk_1` FOREIGN KEY (`Domain`) REFERENCES `NetworkDomain` (`Id`);');
     1364
    13451365}
    13461366
     
    14111431      731 => array('Revision' => 735, 'Function' => 'UpdateTo735'),
    14121432      735 => array('Revision' => 736, 'Function' => 'UpdateTo736'),
     1433      736 => array('Revision' => 739, 'Function' => 'UpdateTo739'),
    14131434    ));
    14141435  }
Note: See TracChangeset for help on using the changeset viewer.