Ignore:
Timestamp:
Dec 20, 2013, 11:57:02 PM (11 years ago)
Author:
chronos
Message:
  • Přidáno: Další položky do tabulky "Bezdrátové rozhraní".
  • Přidáno: Příprava tabulky NewsImport pro zobecnění importu aktualit z jiných webů.
File:
1 edited

Legend:

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

    r610 r615  
    489489}
    490490
     491function UpdateTo615($Manager)
     492{
     493  $Manager->Execute('ALTER TABLE `NetworkInterfaceWireless` ADD `AntennaPolarity` INT NOT NULL ,
     494ADD `Description` VARCHAR( 255 ) NOT NULL ;');
     495  $Manager->Execute('CREATE TABLE IF NOT EXISTS `NewsImport` (
     496  `Id` int(11) NOT NULL,
     497  `Name` varchar(255) NOT NULL,
     498  `Enabled` int(11) NOT NULL,
     499  `Source` varchar(255) NOT NULL,
     500  `Category` int(11) NOT NULL,
     501  `BlockStart` varchar(255) NOT NULL,
     502  `BlockEnd` varchar(255) NOT NULL,
     503  `ItemStart` varchar(255) NOT NULL,
     504  `ItemEnd` varchar(255) NOT NULL,
     505  `TitleStart` varchar(255) NOT NULL,
     506  `TitleEnd` varchar(255) NOT NULL,
     507  `ContentStart` varchar(255) NOT NULL,
     508  `ContentEnd` varchar(255) NOT NULL,
     509  `LinkStart` varchar(255) NOT NULL,
     510  `LinkEnd` varchar(255) NOT NULL,
     511  `DateStart` varchar(255) NOT NULL,
     512  `DateEnd` varchar(255) NOT NULL,
     513  KEY `Category` (`Category`)
     514) ENGINE=InnoDB DEFAULT CHARSET=utf8;');
     515  $Manager->Execute('ALTER TABLE `NewsImport` '.
     516    'ADD CONSTRAINT `NewsImport_ibfk_1` FOREIGN KEY (`Category`) '.
     517    ' REFERENCES `NewsCategory` (`Id`);');
     518  $Manager->Execute('ALTER TABLE `NetworkInterfaceWireless` ADD `Product` INT NULL AFTER `AntennaPolarity` ,
     519ADD INDEX ( `Product` ) ;');
     520  $Manager->Execute('ALTER TABLE `NetworkInterfaceWireless` ADD FOREIGN KEY ( `Product` ) REFERENCES `Product` (
     521`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT ;');
     522  $Manager->Execute('ALTER TABLE `NetworkInterfaceWireless` ADD `MAC` VARCHAR( 17 ) NOT NULL ;');
     523}
     524
    491525class Updates
    492526{
     
    519553      591 => array('Revision' => 597, 'Function' => 'UpdateTo597'),
    520554      597 => array('Revision' => 601, 'Function' => 'UpdateTo601'),
     555      601 => array('Revision' => 615, 'Function' => 'UpdateTo615'),
    521556    ));
    522557  }
Note: See TracChangeset for help on using the changeset viewer.