Changeset 712
- Timestamp:
- Jul 30, 2013, 11:34:19 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 5 5 minimanager 6 6 mmfpm 7 .settings 8 .buildpath 9 .project
-
- Property svn:ignore
-
trunk/.htaccess
r690 r712 1 1 #Options +FollowSymlinks 2 2 RewriteEngine on 3 RewriteBase / 4 5 # Pretty urls on localhost with alias 6 RewriteCond %{HTTP_HOST} localhost 3 7 RewriteCond %{REQUEST_FILENAME} !-f 4 8 RewriteCond %{REQUEST_FILENAME} !-d 5 RewriteRule ^(.*)$ index.php?$19 RewriteRule ^(.*)$ wow/index.php?$1 -
trunk/inc/config.sample.php
r690 r712 19 19 'UDBRevision' => '204', 20 20 'ScriptDev2Revision' => '137', 21 'ClientVersion' => '3. 1.3',21 'ClientVersion' => '3.3.5a', 22 22 'DatabaseHost' => 'localhost', 23 23 'DatabaseUser' => 'server1', … … 38 38 ( 39 39 'Charset' => 'utf-8', 40 'Host' => ' george-virt.zdechov.net',40 'Host' => 'localhost', 41 41 'Description' => 'Neoficiální herní server hry World of Warcraft', 42 42 'Keywords' => 'wowserver, world of warcraft, free, wow, server, hof, heroes of fantasy, zdechov, mangos', … … 51 51 'ShowPHPError' => false, 52 52 'ServerFounded' => '1.1.2000', 53 'BankAccount' => ' 670100-2202937132/6210',53 'BankAccount' => '', 54 54 'TableRowPerPage' => 20, 55 55 'DefaultRealmIndex' => 1, -
trunk/inc/database.php
r597 r712 2 2 3 3 // Extended database class 4 // Date: 2009-02-16 5 6 class Database extends mysqli 7 { 8 var $Prefix = ''; 4 // Date: 2011-11-25 5 6 7 class DatabaseResult 8 { 9 var $PDOStatement; 10 var $num_rows = 0; 11 12 function fetch_assoc() 13 { 14 return($this->PDOStatement->fetch(PDO::FETCH_ASSOC)); 15 } 16 17 function fetch_array() 18 { 19 return($this->PDOStatement->fetch(PDO::FETCH_BOTH)); 20 } 21 22 function fetch_row() 23 { 24 return($this->PDOStatement->fetch(PDO::FETCH_NUM)); 25 } 26 } 27 28 class Database 29 { 30 var $Prefix; 31 var $Functions; 32 var $Type; 33 var $PDO; 34 var $Error; 35 var $insert_id; 36 var $LastQuery; 37 var $ShowSQLError; 38 var $ShowSQLQuery; 39 var $LogFile; 40 41 function __construct() 42 { 43 $this->Functions = array('NOW()', 'CURDATE()', 'CURTIME()', 'UUID()'); 44 $this->Type = 'mysql'; // mysql, pgsql 45 $this->ShowSQLError = false; 46 $this->ShowSQLQuery = false; 47 $this->LogSQLQuery = false; 48 $this->LogFile = dirname(__FILE__).'/../Query.log'; 49 } 50 51 function Connect($Host, $User, $Password, $Database) 52 { 53 if($this->Type == 'mysql') $ConnectionString = 'mysql:host='.$Host.';dbname='.$Database; 54 else if($this->Type == 'pgsql') $ConnectionString = 'pgsql:dbname='.$Database.';host='.$Host; 55 else $ConnectionString = ''; 56 $this->PDO = new PDO($ConnectionString, $User, $Password); 57 } 58 59 function select_db($Database) 60 { 61 $this->query('USE `'.$Database.'`'); 62 } 9 63 10 64 function query($Query) 11 65 { 12 global $Config; 13 14 if($Config['Web']['ShowSQLQuery'] == true) 15 echo('<div style="border-bottom-width: 1px; border-bottom-style: solid; padding-bottom: 3px; padding-top: 3px; font-size: 12px; font-family: Arial;">'.$Query.'</div>'); 16 $Result = parent::query($Query); 17 if(($this->error != '') and ($Config['Web']['ShowSQLError'] == true)) 18 echo('<div><strong>SQL Error: </strong>'.$this->error.'<br />'.$Query.'</div>'); 19 66 $this->LastQuery = $Query; 67 if($this->ShowSQLQuery == true) 68 echo('<div style="border-bottom-width: 1px; border-bottom-style: solid; padding-bottom: 3px; padding-top: 3px; font-size: 12px; font-family: Arial;">'.$Query.'</div>'."\n"); 69 if($this->LogSQLQuery == true) 70 file_put_contents($this->LogFile, $Query."\n", FILE_APPEND); 71 $Result = new DatabaseResult(); 72 $Result->PDOStatement = $this->PDO->query($Query); 73 if($Result->PDOStatement) 74 { 75 $Result->num_rows = $Result->PDOStatement->rowCount(); 76 $this->insert_id = $this->PDO->lastInsertId(); 77 } else 78 { 79 $this->Error = $this->PDO->errorInfo(); 80 $this->Error = $this->Error[2]; 81 if(($this->Error != '') and ($this->ShowSQLError == true)) 82 echo('<div><strong>SQL Error: </strong>'.$this->Error.'<br />'.$Query.'</div>'); 83 throw new Exception('SQL Error: '.$this->Error); 84 } 20 85 return($Result); 21 86 } 22 87 23 88 function select($Table, $What = '*', $Condition = 1) 24 { 89 { 25 90 return($this->query('SELECT '.$What.' FROM `'.$this->Prefix.$Table.'` WHERE '.$Condition)); 26 91 } … … 37 102 foreach($Data as $Key => $Value) 38 103 { 39 $Value = strtr($Value, '"', '\"');40 104 $Name .= ',`'.$Key.'`'; 41 if($Value == 'NOW()') $Values .= ','.$Value; 42 else if($Value == 'UUID()') $Values .= ','.$Value; 43 else $Values .= ",'".$Value."'"; 105 if(!in_array($Value, $this->Functions)) 106 { 107 if(is_null($Value)) $Value = 'NULL'; 108 else $Value = $this->PDO->quote($Value); 109 } 110 $Values .= ','.$Value; 44 111 } 45 112 $Name = substr($Name, 1); 46 113 $Values = substr($Values, 1); 47 114 $this->query('INSERT INTO `'.$this->Prefix.$Table.'` ('.$Name.') VALUES('.$Values.')'); 115 $this->insert_id = $this->PDO->lastInsertId(); 48 116 } 49 117 … … 53 121 foreach($Data as $Key => $Value) 54 122 { 55 $Value = strtr($Value, '"', '\"'); 56 if($Value != 'NOW()') $Value = "'".$Value."'"; 57 $Values .= ', '.$Key.'='.$Value; 123 if(!in_array($Value, $this->Functions)) 124 { 125 if(is_null($Value)) $Value = 'NULL'; 126 else $Value = $this->PDO->quote($Value); 127 } 128 $Values .= ', `'.$Key.'`='.$Value; 58 129 } 59 130 $Values = substr($Values, 2); … … 67 138 foreach($Data as $Key => $Value) 68 139 { 69 $Value = strtr($Value, '"', '\"'); 140 if(!in_array($Value, $this->Functions)) 141 { 142 if(is_null($Value)) $Value = 'NULL'; 143 else $Value = $this->PDO->quote($Value); 144 } 70 145 $Name .= ',`'.$Key.'`'; 71 if($Value == 'NOW()') $Values .= ','.$Value; 72 else $Values .= ',"'.$Value.'"'; 146 $Values .= ','.$Value; 73 147 } 74 148 $Name = substr($Name, 1); … … 83 157 $this->query('SET NAMES "'.$Charset.'"'); 84 158 } 85 } 86 87 ?> 159 160 function real_escape_string($Text) 161 { 162 return(addslashes($Text)); 163 } 164 } 165 166 function TimeToMysqlDateTime($Time) 167 { 168 if($Time == NULL) return(NULL); 169 else return(date('Y-m-d H:i:s', $Time)); 170 } 171 172 function TimeToMysqlDate($Time) 173 { 174 if($Time == NULL) return(NULL); 175 else return(date('Y-m-d', $Time)); 176 } 177 178 function TimeToMysqlTime($Time) 179 { 180 if($Time == NULL) return(NULL); 181 else return(date('H:i:s', $Time)); 182 } 183 184 function MysqlDateTimeToTime($DateTime) 185 { 186 if($DateTime == '') return(0); 187 $Parts = explode(' ', $DateTime); 188 $DateParts = explode('-', $Parts[0]); 189 $TimeParts = explode(':', $Parts[1]); 190 $Result = mktime($TimeParts[0], $TimeParts[1], $TimeParts[2], $DateParts[1], $DateParts[2], $DateParts[0]); 191 return($Result); 192 } 193 194 function MysqlDateToTime($Date) 195 { 196 if($Date == '') return(0); 197 return(MysqlDateTimeToTime($Date.' 0:0:0')); 198 } 199 200 function MysqlTimeToTime($Time) 201 { 202 if($Time == '') return(0); 203 return(MysqlDateTimeToTime('0000-00-00 '.$Time)); 204 } -
trunk/inc/realm.php
r695 r712 13 13 $DbResult = $this->Database->query('SELECT * FROM Realm WHERE Id='.$Id.' AND Enabled=1'); 14 14 $this->Data = $DbResult->fetch_assoc(); 15 $this->CharactersDatabase = new Database($this->Data['DatabaseHost'], $this->Data['DatabaseUser'], $this->Data['DatabasePassword'], $this->Data['DatabaseCharacters']); 15 $this->CharactersDatabase = new Database(); 16 $this->CharactersDatabase->Connect($this->Data['DatabaseHost'], $this->Data['DatabaseUser'], $this->Data['DatabasePassword'], $this->Data['DatabaseCharacters']); 16 17 $this->CharactersDatabase->select_db($this->Data['DatabaseCharacters']); 17 if($this->CharactersDatabase->connect_error)18 {19 die('Přihlášení k databázi realmu '.$this->Id.' selhalo: '.$this->Database->connect_error);20 }18 //if($this->CharactersDatabase->connect_error) 19 //{ 20 // die('Přihlášení k databázi realmu '.$this->Id.' selhalo: '.$this->Database->connect_error); 21 //} 21 22 $this->CharactersDatabase->charset($this->Config['Database']['Charset']); 22 23 23 $this->MangosDatabase = new Database($this->Data['DatabaseHost'], $this->Data['DatabaseUser'], $this->Data['DatabasePassword'], $this->Data['DatabaseMangos']); 24 $this->MangosDatabase = new Database(); 25 $this->MangosDatabase->Connect($this->Data['DatabaseHost'], $this->Data['DatabaseUser'], $this->Data['DatabasePassword'], $this->Data['DatabaseMangos']); 24 26 $this->MangosDatabase->select_db($this->Data['DatabaseMangos']); 25 if($this->MangosDatabase->connect_error)26 {27 die('Přihlášení k databázi realmu '.$this->Id.' selhalo: '.$this->MangosDatabase->connect_error);28 }27 //if($this->MangosDatabase->connect_error) 28 //{ 29 // die('Přihlášení k databázi realmu '.$this->Id.' selhalo: '.$this->MangosDatabase->connect_error); 30 //} 29 31 $this->MangosDatabase->charset($this->Config['Database']['Charset']); 30 32 } -
trunk/inc/server.php
r697 r712 14 14 $this->Id = $Id; 15 15 $DbResult = $this->Database->query('SELECT * FROM Logon WHERE Id='.$Id.' AND Enabled=1' ); 16 $this->Data = $DbResult->fetch_assoc(); 17 $this->ServerDatabase = new Database($this->Data['DatabaseHost'], $this->Data['DatabaseUser'], $this->Data['DatabasePassword'], $this->Data['DatabaseRealmd']); 18 $this->ServerDatabase->select_db($this->Data['DatabaseRealmd']); 19 if($this->ServerDatabase->connect_error) 16 if($DbResult->num_rows == 1) 20 17 { 21 die('Přihlášení k databázi serveru '.$this->Id.' selhalo: '.$this->ServerDatabase->connect_error); 22 } 23 $this->ServerDatabase->charset($this->Config['Database']['Charset']); 18 $this->Data = $DbResult->fetch_assoc(); 19 $this->ServerDatabase = new Database(); 20 $this->ServerDatabase->Connect($this->Data['DatabaseHost'], $this->Data['DatabaseUser'], $this->Data['DatabasePassword'], $this->Data['DatabaseRealmd']); 21 $this->ServerDatabase->select_db($this->Data['DatabaseRealmd']); 22 //if($this->ServerDatabase->connect_error) 23 //{ 24 // die('Přihlášení k databázi serveru '.$this->Id.' selhalo: '.$this->ServerDatabase->connect_error); 25 //} 26 $this->ServerDatabase->charset($this->Config['Database']['Charset']); 27 } else throw new Exception('Záznam pro přihlašovací server id '.$Id.' nenalezen!'); 24 28 } 25 29 -
trunk/inc/system.php
r695 r712 47 47 function OpenLogonServerDatabase() 48 48 { 49 $Database = new Database($this->Config['Mangos']['DatabaseHost'], $this->Config['Mangos']['DatabaseUser'], $this->Config['Mangos']['DatabasePassword'], $this->Config['Mangos']['DatabaseRealmd']); 49 $Database = new Database(); 50 $Database->Connect($this->Config['Mangos']['DatabaseHost'], $this->Config['Mangos']['DatabaseUser'], $this->Config['Mangos']['DatabasePassword'], $this->Config['Mangos']['DatabaseRealmd']); 50 51 if(mysqli_connect_error()) 51 52 { … … 58 59 function OpenWebDatabase() 59 60 { 60 $Database = new Database($this->Config['Database']['Host'], $this->Config['Database']['User'], $this->Config['Database']['Password'], $this->Config['Database']['Database']); 61 $Database = new Database(); 62 $Database->Connect($this->Config['Database']['Host'], $this->Config['Database']['User'], $this->Config['Database']['Password'], $this->Config['Database']['Database']); 61 63 if(mysqli_connect_error()) 62 64 { -
trunk/sql/structure.sql
r555 r712 1 --2 -- Struktura tabulky `achievement`3 --4 5 CREATE TABLE IF NOT EXISTS `achievement` (6 `id` bigint(20) NOT NULL COMMENT 'Entry',7 `team` bigint(20) NOT NULL COMMENT '-1=all, 0=horde, 1=alliance',8 `mapid` bigint(20) NOT NULL COMMENT '-1=none - Only set if achievement is related to a zone',9 `field_3` bigint(20) NOT NULL,10 `name01` text NOT NULL,11 `name02` text NOT NULL,12 `name03` text NOT NULL,13 `name04` text NOT NULL,14 `name05` text NOT NULL,15 `name06` text NOT NULL,16 `name07` text NOT NULL,17 `name08` text NOT NULL,18 `name09` text NOT NULL,19 `name10` text NOT NULL,20 `name11` text NOT NULL,21 `name12` text NOT NULL,22 `name13` text NOT NULL,23 `name14` text NOT NULL,24 `name15` text NOT NULL,25 `name16` text NOT NULL,26 `field_20` bigint(20) NOT NULL,27 `description01` text NOT NULL COMMENT 'description - each for one locale',28 `description02` text NOT NULL,29 `description03` text NOT NULL,30 `description04` text NOT NULL,31 `description05` text NOT NULL,32 `description06` text NOT NULL,33 `description07` text NOT NULL,34 `description08` text NOT NULL,35 `description09` text NOT NULL,36 `description10` text NOT NULL,37 `description11` text NOT NULL,38 `description12` text NOT NULL,39 `description13` text NOT NULL,40 `description14` text NOT NULL,41 `description15` text NOT NULL,42 `description16` text NOT NULL,43 `field_37` bigint(20) NOT NULL,44 `categoryid` bigint(20) NOT NULL COMMENT 'id of category',45 `rewpoints` bigint(20) NOT NULL COMMENT 'rewarded points',46 `order` bigint(20) NOT NULL COMMENT 'order in category',47 `flags` bigint(20) NOT NULL COMMENT 'flags',48 `field_42` bigint(20) NOT NULL,49 `rewarddesc01` text NOT NULL COMMENT 'reward description - each for one locale',50 `rewarddesc02` text NOT NULL,51 `rewarddesc03` text NOT NULL,52 `rewarddesc04` text NOT NULL,53 `rewarddesc05` text NOT NULL,54 `rewarddesc06` text NOT NULL,55 `rewarddesc07` text NOT NULL,56 `rewarddesc08` text NOT NULL,57 `rewarddesc09` text NOT NULL,58 `rewarddesc10` text NOT NULL,59 `rewarddesc11` text NOT NULL,60 `rewarddesc12` text NOT NULL,61 `rewarddesc13` text NOT NULL,62 `rewarddesc14` text NOT NULL,63 `rewarddesc15` text NOT NULL,64 `rewarddesc16` text NOT NULL,65 `field_59` bigint(20) NOT NULL,66 `field_60` bigint(20) NOT NULL,67 `field_61` bigint(20) NOT NULL,68 PRIMARY KEY (`id`)69 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;70 71 1 -- -------------------------------------------------------- 72 73 -- 74 -- Struktura tabulky `articles` 75 -- 76 77 CREATE TABLE IF NOT EXISTS `articles` ( 78 `id` int(11) NOT NULL auto_increment, 79 `title` text collate utf8_czech_ci NOT NULL, 80 `autor` text collate utf8_czech_ci NOT NULL, 81 `category` int(11) NOT NULL default '0', 82 `text` text collate utf8_czech_ci NOT NULL, 83 `date` timestamp NOT NULL default '0000-00-00 00:00:00' on update CURRENT_TIMESTAMP, 84 PRIMARY KEY (`id`) 85 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=117 ; 86 2 -- Hostitel: 127.0.0.1 3 -- Verze serveru: 5.5.32-0ubuntu0.13.04.1 - (Ubuntu) 4 -- OS serveru: debian-linux-gnu 5 -- HeidiSQL Verze: 8.0.0.4396 87 6 -- -------------------------------------------------------- 88 7 89 -- 90 -- Struktura tabulky `characters` 91 -- 92 8 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 9 /*!40101 SET NAMES utf8 */; 10 /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 11 /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 12 13 -- Exportování struktury pro tabulka wow_web.Article 14 CREATE TABLE IF NOT EXISTS `Article` ( 15 `Id` int(11) NOT NULL AUTO_INCREMENT, 16 `Title` text COLLATE utf8_czech_ci NOT NULL, 17 `Author` text COLLATE utf8_czech_ci NOT NULL, 18 `Category` int(11) NOT NULL DEFAULT '0', 19 `Content` text COLLATE utf8_czech_ci NOT NULL, 20 `Time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', 21 PRIMARY KEY (`Id`), 22 KEY `Category` (`Category`), 23 KEY `Time` (`Time`), 24 CONSTRAINT `Article_ibfk_1` FOREIGN KEY (`Category`) REFERENCES `ArticleCategory` (`Id`) 25 ) ENGINE=InnoDB AUTO_INCREMENT=117 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; 26 27 -- Exportování dat pro tabulku wow_web.Article: ~0 rows (přibližně) 28 /*!40000 ALTER TABLE `Article` DISABLE KEYS */; 29 /*!40000 ALTER TABLE `Article` ENABLE KEYS */; 30 31 32 -- Exportování struktury pro tabulka wow_web.ArticleCategory 33 CREATE TABLE IF NOT EXISTS `ArticleCategory` ( 34 `Id` int(11) NOT NULL AUTO_INCREMENT, 35 `Name` varchar(255) NOT NULL, 36 PRIMARY KEY (`Id`) 37 ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; 38 39 -- Exportování dat pro tabulku wow_web.ArticleCategory: ~4 rows (přibližně) 40 /*!40000 ALTER TABLE `ArticleCategory` DISABLE KEYS */; 41 INSERT INTO `ArticleCategory` (`Id`, `Name`) VALUES 42 (1, 'Server novinky'), 43 (2, 'GM novinky'), 44 (3, 'In-game novinky'), 45 (4, 'Články'); 46 /*!40000 ALTER TABLE `ArticleCategory` ENABLE KEYS */; 47 48 49 -- Exportování struktury pro tabulka wow_web.characters 93 50 CREATE TABLE IF NOT EXISTS `characters` ( 94 `guid` int(11) NOT NULL default '0', 95 `warm` int(11) NOT NULL default '0', 96 `weblevel` int(11) NOT NULL default '0' 97 ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 98 99 -- -------------------------------------------------------- 100 101 -- 102 -- Struktura tabulky `chyby` 103 -- 104 105 CREATE TABLE IF NOT EXISTS `chyby` ( 106 `id` int(8) NOT NULL auto_increment, 107 `id_name` varchar(128) collate utf8_czech_ci NOT NULL, 108 `jmeno` varchar(128) collate utf8_czech_ci NOT NULL, 109 `prispevek` text collate utf8_czech_ci NOT NULL, 110 `postava` text collate utf8_czech_ci NOT NULL, 111 `typ` int(24) NOT NULL, 112 `frakce` int(24) NOT NULL, 113 `mail` varchar(128) collate utf8_czech_ci NOT NULL, 114 `screenshot` text collate utf8_czech_ci NOT NULL, 115 `datum` int(24) NOT NULL, 116 `status` int(24) NOT NULL, 117 `ip` varchar(16) collate utf8_czech_ci NOT NULL, 118 PRIMARY KEY (`id`) 119 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=91 ; 120 121 -- -------------------------------------------------------- 122 123 -- 124 -- Struktura tabulky `comments` 125 -- 126 51 `guid` int(11) NOT NULL DEFAULT '0', 52 `warm` int(11) NOT NULL DEFAULT '0', 53 `weblevel` int(11) NOT NULL DEFAULT '0' 54 ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 55 56 -- Exportování dat pro tabulku wow_web.characters: ~0 rows (přibližně) 57 /*!40000 ALTER TABLE `characters` DISABLE KEYS */; 58 /*!40000 ALTER TABLE `characters` ENABLE KEYS */; 59 60 61 -- Exportování struktury pro tabulka wow_web.ClientRedirection 62 CREATE TABLE IF NOT EXISTS `ClientRedirection` ( 63 `Id` int(11) NOT NULL AUTO_INCREMENT, 64 `Original` varchar(255) NOT NULL, 65 `Local` varchar(255) NOT NULL, 66 PRIMARY KEY (`Id`) 67 ) ENGINE=MyISAM AUTO_INCREMENT=27 DEFAULT CHARSET=utf8; 68 69 -- Exportování dat pro tabulku wow_web.ClientRedirection: 26 rows 70 /*!40000 ALTER TABLE `ClientRedirection` DISABLE KEYS */; 71 INSERT INTO `ClientRedirection` (`Id`, `Original`, `Local`) VALUES 72 (1, 'http://signup.wow-europe.com/', 'http://www.heroesoffantasy.cz/registrace/'), 73 (2, 'http://www.wow-europe.com/en/support/', 'http://www.heroesoffantasy.cz/podpora/'), 74 (3, 'http://www.wow-europe.com/en/legal', 'http://www.heroesoffantasy.cz/pravni/'), 75 (4, 'http://www.wow-europe.com/en/serverstatus', 'http://www.heroesoffantasy.cz/stav-serveru/'), 76 (5, 'http://www.wow-europe.com/en/account/', 'http://www.heroesoffantasy.cz/ucet/'), 77 (6, 'http://www.wow-europe.com/en/burningcrusade/download', 'http://www.heroesoffantasy.cz/stahovani/'), 78 (7, 'http://eu.blizzard.com/support/article.xml?articleId=19654', 'http://www.heroesoffantasy.cz/platna-verze-hry/'), 79 (8, 'http://www.wow-europe.com/en/misc/banned.html', 'http://www.heroesoffantasy.cz/blokovani/'), 80 (9, 'https://www.wow-europe.com/login-support', 'http://www.heroesoffantasy.cz/podpora-prihlaseni/'), 81 (10, 'www.wow-europe.com/en/support', 'www.heroesoffantasy.cz/podpora/'), 82 (11, 'http://beta.wow-europe.com/en/alert', 'http://www.heroesoffantasy.cz/alert-beta/'), 83 (12, 'http://eu.scan.worldofwarcraft.com/update/Launcher.txt', 'http://www.heroesoffantasy.cz/launcher/'), 84 (13, 'http://eu.scan.worldofwarcraft.com/update/Scan.dll', 'http://www.heroesoffantasy.cz/'), 85 (14, 'http://eu.blizzard.com/support/article.xml?articleId=19644', 'http://www.heroesoffantasy.cz/trojan/'), 86 (15, 'http://eu.blizzard.com/support/article.xml?articleId=19633', 'http://www.heroesoffantasy.cz/hack/'), 87 (16, 'http://status.wow-europe.com/en/alert', 'http://www.heroesoffantasy.cz/alert/'), 88 (17, 'https://www.wow-europe.com/account/account-error.html', 'http://www.heroesoffantasy.cz/chyba-uctu/'), 89 (18, 'http://www.wow-europe.com', 'http://www.heroesoffantasy.cz/'), 90 (19, 'www.wow-europe.com', 'www.heroesoffantasy.cz'), 91 (20, 'http://launcher.wow-europe.com/en/eula.htm', 'http://www.heroesoffantasy.cz/eula/'), 92 (21, 'http://launcher.wow-europe.com/en/tos.htm', 'http://www.heroesoffantasy.cz/tos/'), 93 (22, 'www.wow-europe.com/en/lichking/download/', 'www.heroesoffantasy.cz/stahovani/'), 94 (23, 'http://us.blizzard.com/support/index.xml?gameId=11', 'http://www.heroesoffantasy.cz/podpora/'), 95 (25, 'http://www.worldofwarcraft.com/policy/pvp.shtml', 'http://www.heroesoffantasy.com/pvp/'), 96 (24, 'http://signup.worldofwarcraft.com', 'http://www.heroesoffantasy.cz/registrace/'), 97 (26, 'www.worldofwarcraft.com/support/trial', 'www.heroesoffantasyc.cz/stahovani'); 98 /*!40000 ALTER TABLE `ClientRedirection` ENABLE KEYS */; 99 100 101 -- Exportování struktury pro tabulka wow_web.comments 127 102 CREATE TABLE IF NOT EXISTS `comments` ( 128 `id` int(11) NOT NULL auto_increment, 129 `user` text collate utf8_czech_ci NOT NULL, 130 `comment` text collate utf8_czech_ci NOT NULL, 131 `time` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, 132 PRIMARY KEY (`id`) 133 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ; 134 135 -- -------------------------------------------------------- 136 137 -- 138 -- Struktura tabulky `debug` 139 -- 140 141 CREATE TABLE IF NOT EXISTS `debug` ( 142 `Id` int(11) NOT NULL auto_increment, 103 `id` int(11) NOT NULL AUTO_INCREMENT, 104 `user` text COLLATE utf8_czech_ci NOT NULL, 105 `comment` text COLLATE utf8_czech_ci NOT NULL, 106 `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 107 PRIMARY KEY (`id`) 108 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; 109 110 -- Exportování dat pro tabulku wow_web.comments: ~0 rows (přibližně) 111 /*!40000 ALTER TABLE `comments` DISABLE KEYS */; 112 /*!40000 ALTER TABLE `comments` ENABLE KEYS */; 113 114 115 -- Exportování struktury pro tabulka wow_web.DbVersion 116 CREATE TABLE IF NOT EXISTS `DbVersion` ( 117 `Id` int(11) NOT NULL AUTO_INCREMENT, 118 `Revision` int(11) NOT NULL, 119 PRIMARY KEY (`Id`) 120 ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 121 122 -- Exportování dat pro tabulku wow_web.DbVersion: ~0 rows (přibližně) 123 /*!40000 ALTER TABLE `DbVersion` DISABLE KEYS */; 124 INSERT INTO `DbVersion` ( 125 `Id` , 126 `Revision` 127 ) 128 VALUES ( 129 NULL , '710' 130 ); 131 /*!40000 ALTER TABLE `DbVersion` ENABLE KEYS */; 132 133 134 -- Exportování struktury pro tabulka wow_web.File 135 CREATE TABLE IF NOT EXISTS `File` ( 136 `Id` int(11) NOT NULL AUTO_INCREMENT, 137 `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, 138 `Location` varchar(255) COLLATE utf8_czech_ci NOT NULL, 143 139 `Time` datetime NOT NULL, 144 `Backtrace` mediumtext collate latin2_czech_cs NOT NULL, 145 `Log` text collate latin2_czech_cs NOT NULL, 146 `MangosVersion` varchar(255) collate latin2_czech_cs NOT NULL, 147 `DbVersion` varchar(255) collate latin2_czech_cs NOT NULL, 148 `MaxPlayerCount` int(11) NOT NULL, 149 `Uptime` int(11) NOT NULL, 150 `ErrorLog` text collate latin2_czech_cs NOT NULL, 151 `DbErrors` text collate latin2_czech_cs NOT NULL, 152 `Configuration` text collate latin2_czech_cs NOT NULL, 153 PRIMARY KEY (`Id`) 154 ) ENGINE=MyISAM DEFAULT CHARSET=latin2 COLLATE=latin2_czech_cs AUTO_INCREMENT=1 ; 155 156 -- -------------------------------------------------------- 157 158 -- 159 -- Struktura tabulky `diskuze` 160 -- 161 162 CREATE TABLE IF NOT EXISTS `diskuze` ( 163 `id` int(8) NOT NULL auto_increment, 164 `entry` int(24) NOT NULL, 165 `jmeno` varchar(128) collate utf8_czech_ci NOT NULL, 166 `prispevek` text collate utf8_czech_ci NOT NULL, 167 `datum` int(24) NOT NULL, 168 `ip` varchar(16) collate utf8_czech_ci NOT NULL, 169 PRIMARY KEY (`id`) 170 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=41 ; 171 172 -- -------------------------------------------------------- 173 174 -- 175 -- Struktura tabulky `export_list` 176 -- 177 178 CREATE TABLE IF NOT EXISTS `export_list` ( 179 `typ` varchar(255) collate utf8_czech_ci default NULL, 180 `guid` varchar(255) collate utf8_czech_ci default NULL 181 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; 182 183 -- -------------------------------------------------------- 184 185 -- 186 -- Struktura tabulky `finance` 187 -- 188 189 CREATE TABLE IF NOT EXISTS `finance` ( 190 `id` int(11) NOT NULL auto_increment, 191 `time` datetime default NULL, 192 `money` int(11) default NULL, 193 `operation` enum('contribution','consumption','buy','internet','sell') collate latin2_czech_cs NOT NULL default 'contribution', 194 `description` varchar(255) collate latin2_czech_cs default NULL, 195 `odmena` varchar(255) character set utf8 collate utf8_czech_ci NOT NULL, 196 KEY `ID` (`id`) 197 ) ENGINE=MyISAM DEFAULT CHARSET=latin2 COLLATE=latin2_czech_cs AUTO_INCREMENT=128 ; 198 199 -- -------------------------------------------------------- 200 201 -- 202 -- Struktura tabulky `guildy` 203 -- 204 140 `Category` int(11) NOT NULL, 141 `Description` text COLLATE utf8_czech_ci NOT NULL, 142 PRIMARY KEY (`Id`), 143 KEY `Category` (`Category`), 144 CONSTRAINT `File_ibfk_1` FOREIGN KEY (`Category`) REFERENCES `FileCategory` (`Id`) 145 ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; 146 147 -- Exportování dat pro tabulku wow_web.File: ~0 rows (přibližně) 148 /*!40000 ALTER TABLE `File` DISABLE KEYS */; 149 /*!40000 ALTER TABLE `File` ENABLE KEYS */; 150 151 152 -- Exportování struktury pro tabulka wow_web.FileCategory 153 CREATE TABLE IF NOT EXISTS `FileCategory` ( 154 `Id` int(11) NOT NULL AUTO_INCREMENT, 155 `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, 156 PRIMARY KEY (`Id`) 157 ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; 158 159 -- Exportování dat pro tabulku wow_web.FileCategory: ~2 rows (přibližně) 160 /*!40000 ALTER TABLE `FileCategory` DISABLE KEYS */; 161 INSERT INTO `FileCategory` (`Id`, `Name`) VALUES 162 (1, 'Herní klient WoW'), 163 (2, 'Čeština pro klienta'); 164 /*!40000 ALTER TABLE `FileCategory` ENABLE KEYS */; 165 166 167 -- Exportování struktury pro tabulka wow_web.Finance 168 CREATE TABLE IF NOT EXISTS `Finance` ( 169 `Id` int(11) NOT NULL AUTO_INCREMENT, 170 `Time` datetime DEFAULT NULL, 171 `Money` int(11) DEFAULT NULL, 172 `Operation` enum('contribution','consumption','buy','internet','sell','hosting') CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL DEFAULT 'contribution', 173 `Description` varchar(255) CHARACTER SET utf8 COLLATE utf8_czech_ci DEFAULT NULL, 174 `Reward` varchar(255) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL, 175 KEY `ID` (`Id`) 176 ) ENGINE=InnoDB AUTO_INCREMENT=128 DEFAULT CHARSET=utf8; 177 178 -- Exportování dat pro tabulku wow_web.Finance: ~0 rows (přibližně) 179 /*!40000 ALTER TABLE `Finance` DISABLE KEYS */; 180 /*!40000 ALTER TABLE `Finance` ENABLE KEYS */; 181 182 183 -- Exportování struktury pro tabulka wow_web.FinanceReward 184 CREATE TABLE IF NOT EXISTS `FinanceReward` ( 185 `Id` int(11) NOT NULL AUTO_INCREMENT, 186 `Reward` varchar(255) NOT NULL, 187 `Price` varchar(255) NOT NULL, 188 PRIMARY KEY (`Id`) 189 ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 190 191 -- Exportování dat pro tabulku wow_web.FinanceReward: ~0 rows (přibližně) 192 /*!40000 ALTER TABLE `FinanceReward` DISABLE KEYS */; 193 /*!40000 ALTER TABLE `FinanceReward` ENABLE KEYS */; 194 195 196 -- Exportování struktury pro tabulka wow_web.GmTeam 197 CREATE TABLE IF NOT EXISTS `GmTeam` ( 198 `Nick` varchar(255) NOT NULL, 199 `AccountId` int(11) NOT NULL, 200 `Delegation` varchar(255) NOT NULL, 201 `ForumId` int(11) NOT NULL, 202 `RealmId` int(11) NOT NULL, 203 `TimeFrom` date DEFAULT NULL, 204 `TimeTo` date DEFAULT NULL, 205 KEY `AccountId` (`AccountId`), 206 KEY `TimeFrom` (`TimeFrom`), 207 KEY `TimeTo` (`TimeTo`), 208 KEY `RealmId` (`RealmId`) 209 ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 210 211 -- Exportování dat pro tabulku wow_web.GmTeam: ~0 rows (přibližně) 212 /*!40000 ALTER TABLE `GmTeam` DISABLE KEYS */; 213 /*!40000 ALTER TABLE `GmTeam` ENABLE KEYS */; 214 215 216 -- Exportování struktury pro tabulka wow_web.GuildHouse 217 CREATE TABLE IF NOT EXISTS `GuildHouse` ( 218 `Guild` int(255) DEFAULT NULL, 219 `Realm` int(11) NOT NULL, 220 `Type` int(255) NOT NULL, 221 `NextPayment` date DEFAULT NULL, 222 KEY `Id` (`Guild`), 223 KEY `Type` (`Type`), 224 CONSTRAINT `GuildHouse_ibfk_1` FOREIGN KEY (`Type`) REFERENCES `GuildHouseType` (`Id`) 225 ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 226 227 -- Exportování dat pro tabulku wow_web.GuildHouse: ~0 rows (přibližně) 228 /*!40000 ALTER TABLE `GuildHouse` DISABLE KEYS */; 229 /*!40000 ALTER TABLE `GuildHouse` ENABLE KEYS */; 230 231 232 -- Exportování struktury pro tabulka wow_web.GuildHouseType 233 CREATE TABLE IF NOT EXISTS `GuildHouseType` ( 234 `Id` int(11) NOT NULL AUTO_INCREMENT, 235 `Name` varchar(255) NOT NULL, 236 `Tax` int(11) NOT NULL, 237 PRIMARY KEY (`Id`) 238 ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 239 240 -- Exportování dat pro tabulku wow_web.GuildHouseType: ~0 rows (přibližně) 241 /*!40000 ALTER TABLE `GuildHouseType` DISABLE KEYS */; 242 /*!40000 ALTER TABLE `GuildHouseType` ENABLE KEYS */; 243 244 245 -- Exportování struktury pro tabulka wow_web.GuildInfo 246 CREATE TABLE IF NOT EXISTS `GuildInfo` ( 247 `Id` int(11) NOT NULL DEFAULT '0', 248 `Guild` int(11) NOT NULL, 249 `Realm` int(11) NOT NULL, 250 `Homepage` varchar(255) NOT NULL, 251 PRIMARY KEY (`Id`), 252 KEY `Guild` (`Guild`), 253 KEY `Realm` (`Realm`) 254 ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 255 256 -- Exportování dat pro tabulku wow_web.GuildInfo: ~0 rows (přibližně) 257 /*!40000 ALTER TABLE `GuildInfo` DISABLE KEYS */; 258 /*!40000 ALTER TABLE `GuildInfo` ENABLE KEYS */; 259 260 261 -- Exportování struktury pro tabulka wow_web.guildy 205 262 CREATE TABLE IF NOT EXISTS `guildy` ( 206 `id` varchar(255) defaultNULL,207 `jmeno` varchar(255) character set utf8 collate utf8_czech_ci defaultNULL,208 `GuM` varchar(255) defaultNULL,263 `id` varchar(255) DEFAULT NULL, 264 `jmeno` varchar(255) CHARACTER SET utf8 COLLATE utf8_czech_ci DEFAULT NULL, 265 `GuM` varchar(255) DEFAULT NULL, 209 266 `typgh` varchar(255) NOT NULL, 210 `dalsi_platba` date defaultNULL267 `dalsi_platba` date DEFAULT NULL 211 268 ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 212 269 213 -- -------------------------------------------------------- 214 215 -- 216 -- Struktura tabulky `users` 217 -- 218 270 -- Exportování dat pro tabulku wow_web.guildy: ~0 rows (přibližně) 271 /*!40000 ALTER TABLE `guildy` DISABLE KEYS */; 272 /*!40000 ALTER TABLE `guildy` ENABLE KEYS */; 273 274 275 -- Exportování struktury pro tabulka wow_web.Host 276 CREATE TABLE IF NOT EXISTS `Host` ( 277 `Id` int(11) NOT NULL AUTO_INCREMENT, 278 `OS` varchar(255) NOT NULL, 279 `CPU` varchar(255) NOT NULL, 280 `Memory` varchar(255) NOT NULL, 281 `HDD` varchar(255) NOT NULL, 282 `Internet` varchar(255) NOT NULL, 283 `Address` varchar(255) NOT NULL, 284 `Statistic` varchar(255) NOT NULL, 285 `Enabled` int(11) NOT NULL DEFAULT '1', 286 PRIMARY KEY (`Id`) 287 ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; 288 289 -- Exportování dat pro tabulku wow_web.Host: ~1 rows (přibližně) 290 /*!40000 ALTER TABLE `Host` DISABLE KEYS */; 291 INSERT INTO `Host` (`Id`, `OS`, `CPU`, `Memory`, `HDD`, `Internet`, `Address`, `Statistic`, `Enabled`) VALUES 292 (3, 'Linux', '', '', '', '', 'localhost', '', 1); 293 /*!40000 ALTER TABLE `Host` ENABLE KEYS */; 294 295 296 -- Exportování struktury pro tabulka wow_web.Logon 297 CREATE TABLE IF NOT EXISTS `Logon` ( 298 `Id` int(11) NOT NULL AUTO_INCREMENT, 299 `Host` int(11) NOT NULL, 300 `DatabaseUser` varchar(255) NOT NULL, 301 `DatabasePassword` varchar(255) NOT NULL, 302 `DatabaseHost` varchar(255) NOT NULL, 303 `DatabaseRealmd` varchar(255) NOT NULL, 304 `ClientVersion` varchar(255) NOT NULL, 305 `Port` int(11) NOT NULL, 306 `Online` int(11) NOT NULL, 307 `Name` varchar(255) NOT NULL, 308 `Enabled` int(11) NOT NULL DEFAULT '1', 309 PRIMARY KEY (`Id`), 310 KEY `Host` (`Host`), 311 CONSTRAINT `Logon_ibfk_1` FOREIGN KEY (`Host`) REFERENCES `Host` (`Id`) 312 ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; 313 314 -- Exportování dat pro tabulku wow_web.Logon: ~1 rows (přibližně) 315 /*!40000 ALTER TABLE `Logon` DISABLE KEYS */; 316 INSERT INTO `Logon` (`Id`, `Host`, `DatabaseUser`, `DatabasePassword`, `DatabaseHost`, `DatabaseRealmd`, `ClientVersion`, `Port`, `Online`, `Name`, `Enabled`) VALUES 317 (1, 3, 'wow', 'tenkyprut', 'localhost', 'wow_auth', '4.3.4', 3724, 0, 'Hlavní', 1); 318 /*!40000 ALTER TABLE `Logon` ENABLE KEYS */; 319 320 321 -- Exportování struktury pro tabulka wow_web.Realm 322 CREATE TABLE IF NOT EXISTS `Realm` ( 323 `Id` int(11) NOT NULL AUTO_INCREMENT, 324 `Host` int(11) NOT NULL, 325 `Logon` int(11) NOT NULL, 326 `DatabaseHost` varchar(255) NOT NULL, 327 `DatabaseUser` varchar(255) NOT NULL, 328 `DatabasePassword` varchar(255) NOT NULL, 329 `DatabaseCharacters` varchar(255) NOT NULL, 330 `DatabaseMangos` varchar(255) NOT NULL, 331 `DatabaseScriptDev2` varchar(255) NOT NULL, 332 `MaxOnlinePlayers` int(11) NOT NULL, 333 `Rate` varchar(255) NOT NULL, 334 `Type` varchar(255) NOT NULL, 335 `Name` varchar(255) NOT NULL, 336 `Description` text NOT NULL, 337 `Online` int(11) NOT NULL DEFAULT '0', 338 `Port` int(11) NOT NULL, 339 `Enabled` int(11) NOT NULL DEFAULT '1', 340 `Information` text NOT NULL, 341 `Locale` varchar(255) NOT NULL, 342 PRIMARY KEY (`Id`), 343 UNIQUE KEY `Port` (`Port`), 344 KEY `Host` (`Host`), 345 KEY `Logon` (`Logon`), 346 CONSTRAINT `Realm_ibfk_1` FOREIGN KEY (`Host`) REFERENCES `Host` (`Id`), 347 CONSTRAINT `Realm_ibfk_2` FOREIGN KEY (`Logon`) REFERENCES `Logon` (`Id`) 348 ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; 349 350 -- Exportování dat pro tabulku wow_web.Realm: ~1 rows (přibližně) 351 /*!40000 ALTER TABLE `Realm` DISABLE KEYS */; 352 INSERT INTO `Realm` (`Id`, `Host`, `Logon`, `DatabaseHost`, `DatabaseUser`, `DatabasePassword`, `DatabaseCharacters`, `DatabaseMangos`, `DatabaseScriptDev2`, `MaxOnlinePlayers`, `Rate`, `Type`, `Name`, `Description`, `Online`, `Port`, `Enabled`, `Information`, `Locale`) VALUES 353 (3, 3, 1, 'localhost', 'wow', 'tenkyprut', 'wow_characters', 'wow_world', '', 100, '1x', 'normal', 'Virtuál', 'ssdasdas asd as dsa dasd', 0, 8081, 1, '', 'csCZ'); 354 /*!40000 ALTER TABLE `Realm` ENABLE KEYS */; 355 356 357 -- Exportování struktury pro tabulka wow_web.users 219 358 CREATE TABLE IF NOT EXISTS `users` ( 220 `id` int(11) NOT NULL auto_increment, 221 `realmd_id` int(11) NOT NULL default '0', 222 `name` text character set utf8 collate utf8_czech_ci NOT NULL, 223 PRIMARY KEY (`id`) 224 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 225 226 -- -------------------------------------------------------- 227 228 -- 229 -- Struktura tabulky `uzivatele` 230 -- 231 232 CREATE TABLE IF NOT EXISTS `uzivatele` ( 233 `id` int(64) NOT NULL auto_increment, 234 `user` varchar(1024) collate utf8_czech_ci NOT NULL, 235 `pass` varchar(40) collate utf8_czech_ci NOT NULL, 236 `mail` varchar(1024) collate utf8_czech_ci NOT NULL, 237 PRIMARY KEY (`id`) 238 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=3 ; 359 `id` int(11) NOT NULL AUTO_INCREMENT, 360 `realmd_id` int(11) NOT NULL DEFAULT '0', 361 `name` text CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL, 362 PRIMARY KEY (`id`) 363 ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 364 365 -- Exportování dat pro tabulku wow_web.users: ~0 rows (přibližně) 366 /*!40000 ALTER TABLE `users` DISABLE KEYS */; 367 /*!40000 ALTER TABLE `users` ENABLE KEYS */; 368 /*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; 369 /*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */; 370 /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -
trunk/sql/updates/650.sql
r681 r712 65 65 ALTER TABLE `Logon` ADD `Port` INT NOT NULL ; 66 66 67 ALTER TABLE `articles` CHANGE `id` `Id` INT( 11 ) NOT NULL AUTO_INCREMENT , 68 CHANGE `title` `Title` TEXT CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL , 69 CHANGE `autor` `Author` TEXT CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL , 70 CHANGE `category` `Category` INT( 11 ) NOT NULL DEFAULT '0', 71 CHANGE `text` `Content` TEXT CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL , 72 CHANGE `date` `Time` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'; 73 74 RENAME TABLE `articles` TO `Article` ; 75 ALTER TABLE `Article` ENGINE = InnoDB; 76 77 ALTER TABLE `Article` ADD INDEX ( `Category` ) ; 78 79 CREATE TABLE IF NOT EXISTS `ArticleCategory` ( 80 `Id` int(11) NOT NULL auto_increment, 81 `Name` varchar(255) NOT NULL, 82 PRIMARY KEY (`Id`) 83 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 84 85 INSERT INTO `ArticleCategory` (`Id`, `Name`) VALUES 86 (1, 'Server novinky'), 87 (2, 'GM novinky'), 88 (3, 'In-game novinky'), 89 (4, 'Články'); 90 91 ALTER TABLE `Article` ADD FOREIGN KEY ( `Category` ) REFERENCES `ArticleCategory` (`Id`); 92
Note:
See TracChangeset
for help on using the changeset viewer.