1 | ALTER TABLE `GmTeam` ADD INDEX ( `TimeFrom` ) ;
|
---|
2 | ALTER TABLE `GmTeam` ADD INDEX ( `TimeTo` ) ;
|
---|
3 | ALTER TABLE `GmTeam` ADD INDEX ( `RealmId` ) ;
|
---|
4 |
|
---|
5 | DROP TABLE `achievement` ,
|
---|
6 | `chyby` ,
|
---|
7 | `diskuze` ,
|
---|
8 | `export_list` ,
|
---|
9 | `uzivatele` ;
|
---|
10 |
|
---|
11 | CREATE TABLE IF NOT EXISTS `Realm` (
|
---|
12 | `Id` int(11) NOT NULL auto_increment,
|
---|
13 | `Host` int(11) NOT NULL,
|
---|
14 | `Logon` int(11) NOT NULL,
|
---|
15 | `DatabaseHost` varchar(255) NOT NULL,
|
---|
16 | `DatabaseUser` varchar(255) NOT NULL,
|
---|
17 | `DatabasePassword` varchar(255) NOT NULL,
|
---|
18 | `DatabaseCharacters` varchar(255) NOT NULL,
|
---|
19 | `DatabaseMangos` varchar(255) NOT NULL,
|
---|
20 | `DatabaseScriptDev2` varchar(255) NOT NULL,
|
---|
21 | `MaxOnlinePlayers` int(11) NOT NULL,
|
---|
22 | `Rate` int(11) NOT NULL,
|
---|
23 | `Type` varchar(255) NOT NULL,
|
---|
24 | `Name` varchar(255) NOT NULL,
|
---|
25 | `Description` text NOT NULL,
|
---|
26 | PRIMARY KEY (`Id`)
|
---|
27 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
|
---|
28 |
|
---|
29 | CREATE TABLE IF NOT EXISTS `Logon` (
|
---|
30 | `Id` int(11) NOT NULL auto_increment,
|
---|
31 | `Host` int(11) NOT NULL,
|
---|
32 | `DatabaseUser` varchar(255) NOT NULL,
|
---|
33 | `DatabasePassword` varchar(255) NOT NULL,
|
---|
34 | `DatabaseHost` varchar(255) NOT NULL,
|
---|
35 | `DatabaseRealmd` varchar(255) NOT NULL,
|
---|
36 | `ClientVersion` varchar(255) NOT NULL,
|
---|
37 | PRIMARY KEY (`Id`)
|
---|
38 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
|
---|
39 |
|
---|
40 |
|
---|
41 | CREATE TABLE IF NOT EXISTS `Host` (
|
---|
42 | `Id` int(11) NOT NULL auto_increment,
|
---|
43 | `OS` varchar(255) NOT NULL,
|
---|
44 | `CPU` varchar(255) NOT NULL,
|
---|
45 | `Memory` varchar(255) NOT NULL,
|
---|
46 | `HDD` varchar(255) NOT NULL,
|
---|
47 | `Internet` varchar(255) NOT NULL,
|
---|
48 | `Address` varchar(255) NOT NULL,
|
---|
49 | `Statistic` varchar(255) NOT NULL,
|
---|
50 | PRIMARY KEY (`Id`)
|
---|
51 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
|
---|
52 |
|
---|
53 | ALTER TABLE `Logon` ADD INDEX ( `Host` ) ;
|
---|
54 | ALTER TABLE `Logon` ADD FOREIGN KEY ( `Host` ) REFERENCES `Host` (`Id`);
|
---|
55 |
|
---|
56 | ALTER TABLE `Realm` ADD INDEX ( `Host` ) ;
|
---|
57 | ALTER TABLE `Realm` ADD INDEX ( `Logon` ) ;
|
---|
58 |
|
---|
59 | ALTER TABLE `Realm` ADD FOREIGN KEY ( `Host` ) REFERENCES `Host` (`Id`);
|
---|
60 | ALTER TABLE `Realm` ADD FOREIGN KEY ( `Logon` ) REFERENCES `Logon` (`Id`);
|
---|
61 |
|
---|
62 | ALTER TABLE `Article` ADD INDEX ( `Time` ) ;
|
---|
63 |
|
---|
64 | ALTER TABLE `Realm` ADD `Online` INT NOT NULL DEFAULT '0';
|
---|
65 | ALTER TABLE `Logon` ADD `Port` INT NOT NULL ;
|
---|
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 |
|
---|