Ignore:
Timestamp:
Mar 17, 2013, 10:49:19 AM (12 years ago)
Author:
chronos
Message:
  • Opraveno: Aktualizace databáze z 499 na 502.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/Updates.php

    r502 r503  
    136136  $Manager->Execute("ALTER TABLE `FinanceBankAccount` ADD `Bank` INT NOT NULL AFTER `Number` ,".
    137137     " ADD INDEX ( `Bank` )");
     138  $Manager->Execute("INSERT INTO `FinanceBank` (`Id`, `Name`, `Code`, `BIC`, `Country`) VALUES
     139  (1, 'Neznámá banka', '', '', 1);");
     140  $Manager->Execute("UPDATE `FinanceBankAccount` SET `Bank` = 1 WHERE `Bank` = 0");
    138141  $Manager->Execute("ALTER TABLE `FinanceBankAccount` ADD FOREIGN KEY ( `Bank` ) REFERENCES `FinanceBank` (".
    139142    "`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT ;");
     
    150153  $Manager->Execute("INSERT INTO `ISMenuItem` (`Id` ,`Name` ,`Parent` ,`Table` ,`IconName`) ".
    151154    "VALUES (NULL , 'Banka', '2', '', '');");
    152   $Manager->Execute("UPDATE `ISMenuItem` SET `Parent` = '51' WHERE `ISMenuItem`.`Id` =10; ".
    153     "UPDATE `ISMenuItem` SET `Parent` = '51' WHERE `ISMenuItem`.`Id` =48;".
    154     "UPDATE `ISMenuItem` SET `Parent` = '51' WHERE `ISMenuItem`.`Id` =50;");
     155  $Id = $Manager->Database->insert_id;
     156  $Manager->Execute("UPDATE `ISMenuItem` SET `Parent` = '".$Id."' WHERE `ISMenuItem`.`Id` =10; ".
     157    "UPDATE `ISMenuItem` SET `Parent` = '".$Id."' WHERE `ISMenuItem`.`Id` =48;".
     158    "UPDATE `ISMenuItem` SET `Parent` = '".$Id."' WHERE `ISMenuItem`.`Id` =50;");
    155159}
    156160
Note: See TracChangeset for help on using the changeset viewer.