Ignore:
Timestamp:
May 12, 2013, 10:47:04 PM (11 years ago)
Author:
chronos
Message:
  • Upraveno: Kódování tabulek sjednoceno na utf8 general.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/Updates.php

    r531 r535  
    266266) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;");
    267267  $Manager->Execute("INSERT INTO `ActionIcon` (SELECT NULL AS `Id`, `IconFile` AS `Name` FROM `Action` WHERE `IconFile` != '' GROUP BY `IconFile`)");
     268  $Manager->Execute("ALTER TABLE `Action` CHANGE `IconFile` `IconFile` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL");
    268269  $Manager->Execute("UPDATE `Action` SET `IconFile` = (SELECT `Id` FROM `ActionIcon` WHERE `ActionIcon`.`Name` = `Action`.`IconFile`) ");
    269270  $Manager->Execute("ALTER TABLE `Action` CHANGE `IconFile` `Icon` INT NULL ");
     
    301302  $Manager->Execute("INSERT INTO `MenuItem` (`Id` ,`Name` ,`Parent` ,`Action` ,`Menu`) ".
    302303    "VALUES (NULL , 'Nabídky', '23', '".$ActionId."', '1');"); 
     304}
     305
     306function UpdateTo535($Manager)
     307{
     308  // Set all string collation to utf8 general
     309  $DbResult = $Manager->Execute("SHOW TABLES");
     310  while($DbRow = $DbResult->fetch_row())
     311  {
     312    $Manager->Execute("ALTER TABLE `".$DbRow[0]."` CONVERT TO CHARACTER SET utf8");
     313  } 
    303314}
    304315
     
    318329  517 => array('Revision' => 526, 'Function' => 'UpdateTo526'),
    319330  526 => array('Revision' => 527, 'Function' => 'UpdateTo527'),
     331  527 => array('Revision' => 535, 'Function' => 'UpdateTo535'),
    320332);
    321333
Note: See TracChangeset for help on using the changeset viewer.