Ignore:
Timestamp:
Mar 25, 2014, 12:38:20 AM (11 years ago)
Author:
chronos
Message:
  • Přidáno: Typ sazby DPH jako samostatná tabulka.
File:
1 edited

Legend:

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

    r644 r645  
    562562}
    563563
     564function UpdateTo645($Manager)
     565{
     566        $Manager->Execute('CREATE TABLE IF NOT EXISTS `FinanceVATType` (
     567  `Id` int(11) NOT NULL,
     568  `Name` varchar(255) NOT NULL,
     569  PRIMARY KEY (`Id`)
     570) ENGINE=InnoDB DEFAULT CHARSET=utf8;');
     571  $Manager->Execute('INSERT INTO `FinanceVATType` FROM (SELECT Id, Name FROM `FinanceVAT`)');
     572  $Manager->Execute('ALTER TABLE `FinanceVAT` ADD `ValidTo` DATE NULL ,
     573ADD `Type` INT NOT NULL ;');
     574  $Manager->Execute('UPDATE `FinanceVAT` SET `Type`=(SELECT `Id` FROM `FinanceVATType` WHERE `FinanceVATType`.`Name`=`FinanceVAT`.`Name`)');
     575  $Manager->Execute('ALTER TABLE `FinanceVAT` DROP `Name`');
     576}
     577
     578
    564579class Updates
    565580{
     
    598613      627 => array('Revision' => 632, 'Function' => 'UpdateTo632'),
    599614      632 => array('Revision' => 633, 'Function' => 'UpdateTo633'),
     615      633 => array('Revision' => 645, 'Function' => 'UpdateTo645'),
    600616    ));
    601617  }
Note: See TracChangeset for help on using the changeset viewer.