Changeset 535


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

Legend:

Unmodified
Added
Removed
  • trunk/Common/Version.php

    r534 r535  
    11<?php
    22
    3 $Revision = 534; // Subversion revision
    4 $DatabaseRevision = 527; // SQL structure revision
    5 $ReleaseTime = '2013-04-24';
     3$Revision = 535; // Subversion revision
     4$DatabaseRevision = 535; // SQL structure revision
     5$ReleaseTime = '2013-05-12';
    66
    77?>
  • 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.