Ignore:
Timestamp:
Dec 24, 2015, 4:20:00 PM (9 years ago)
Author:
chronos
Message:
  • Fixed: SQL upgrade function.
File:
1 edited

Legend:

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

    r770 r771  
    16371637function UpdateTo768($Manager)
    16381638{
    1639   $Manager->Execute('ALTER TABLE `NetworkDomainAlias` ADD `Domain` INT NOT NULL AFTER `Comment`;');
     1639/*  $Manager->Execute('ALTER TABLE `NetworkDomainAlias` ADD `Domain` INT NOT NULL AFTER `Comment`;');
    16401640  $Manager->Execute('ALTER TABLE `NetworkDomainAlias` ADD KEY `Domain` (`Domain`);');
    16411641  $Manager->Execute('UPDATE `NetworkDomainAlias` SET `Domain`=1');
     
    16531653  `Suffix` varchar(255) NOT NULL,
    16541654  `View` int(11) NOT NULL,
    1655   `AddressRange` varchar(255) NOT NULL
     1655  `AddressRange` varchar(255) NOT NULL,
    16561656  PRIMARY KEY (`Id`),
    16571657  KEY `Domain` (`Domain`),
     
    16631663  `AddressRange` varchar(255) NOT NULL,
    16641664  `Name` varchar(255) NOT NULL,
    1665   `SysName` varchar(255) NOT NULL
     1665  `SysName` varchar(255) NOT NULL,
    16661666  PRIMARY KEY (`Id`),
    16671667  KEY `Domain` (`Domain`)
    16681668) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;');
     1669*/
     1670        $Manager->Execute('ALTER TABLE `NetworkDomainItemFilter`
     1671  ADD FOREIGN KEY (`Domain`) REFERENCES `NetworkDomain` (`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT;');
    16691672  $Manager->Execute('ALTER TABLE `NetworkDomainItemFilter`
    1670   ADD CONSTRAINT `NetworkDomainItemFilter_ibfk_1` FOREIGN KEY (`Domain`) REFERENCES `NetworkDomain` (`Id`);');
    1671   $Manager->Execute('ALTER TABLE `NetworkDomainItemFilter`
    1672   ADD FOREIGN KEY (`Domain`) REFERENCES `NetworkDomainView`(`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT;');
     1673  ADD FOREIGN KEY (`View`) REFERENCES `NetworkDomainView`(`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT;');
    16731674  $Manager->Execute('ALTER TABLE `NetworkDomainView`
    16741675  ADD FOREIGN KEY (`Domain`) REFERENCES `NetworkDomainView`(`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT;');
Note: See TracChangeset for help on using the changeset viewer.