
RENAME TABLE `npc_text`  TO `npc` ;
RENAME TABLE `client_text`  TO `client` ;
RENAME TABLE `page_text`  TO `page` ;

ALTER TABLE `client_text` CHANGE `text` `Text` TEXT CHARACTER SET latin2 COLLATE latin2_czech_cs NULL DEFAULT NULL ;
ALTER TABLE `page` CHANGE `text` `Text` TEXT CHARACTER SET latin2 COLLATE latin2_czech_cs NULL DEFAULT NULL ;
ALTER TABLE `npc` 
CHANGE `text0_0` `Text0_0` TEXT CHARACTER SET latin2 COLLATE latin2_czech_cs NULL DEFAULT NULL, 
CHANGE `text0_1` `Text0_1` TEXT CHARACTER SET latin2 COLLATE latin2_czech_cs NULL DEFAULT NULL, 
CHANGE `text1_0` `Text1_0` TEXT CHARACTER SET latin2 COLLATE latin2_czech_cs NULL DEFAULT NULL, 
CHANGE `text1_1` `Text1_1` TEXT CHARACTER SET latin2 COLLATE latin2_czech_cs NULL DEFAULT NULL, 
CHANGE `text2_0` `Text2_0` TEXT CHARACTER SET latin2 COLLATE latin2_czech_cs NULL DEFAULT NULL, 
CHANGE `text2_1` `Text2_1` TEXT CHARACTER SET latin2 COLLATE latin2_czech_cs NULL DEFAULT NULL, 
CHANGE `text3_0` `Text3_0` TEXT CHARACTER SET latin2 COLLATE latin2_czech_cs NULL DEFAULT NULL, 
CHANGE `text3_1` `Text3_1` TEXT CHARACTER SET latin2 COLLATE latin2_czech_cs NULL DEFAULT NULL, 
CHANGE `text4_0` `Text4_0` TEXT CHARACTER SET latin2 COLLATE latin2_czech_cs NULL DEFAULT NULL, 
CHANGE `text4_1` `Text4_1` TEXT CHARACTER SET latin2 COLLATE latin2_czech_cs NULL DEFAULT NULL, 
CHANGE `text5_0` `Text5_0` TEXT CHARACTER SET latin2 COLLATE latin2_czech_cs NULL DEFAULT NULL, 
CHANGE `text5_1` `Text5_1` TEXT CHARACTER SET latin2 COLLATE latin2_czech_cs NULL DEFAULT NULL, 
CHANGE `text6_0` `Text6_0` TEXT CHARACTER SET latin2 COLLATE latin2_czech_cs NULL DEFAULT NULL, 
CHANGE `text6_1` `Text6_1` TEXT CHARACTER SET latin2 COLLATE latin2_czech_cs NULL DEFAULT NULL, 
CHANGE `text7_0` `Text7_0` TEXT CHARACTER SET latin2 COLLATE latin2_czech_cs NULL DEFAULT NULL, 
CHANGE `text7_1` `Text7_1` TEXT CHARACTER SET latin2 COLLATE latin2_czech_cs NULL DEFAULT NULL;

ALTER TABLE `quests_vote` CHANGE `IDquest` `TextId` INT( 11 ) NOT NULL;
ALTER TABLE `page_vote` CHANGE `IDpage` `TextId` INT( 11 ) NOT NULL; 
ALTER TABLE `npc_vote` CHANGE `IDnpc` `TextId` INT( 11 ) NOT NULL; 
ALTER TABLE `client_vote` CHANGE `IDclient` `TextId` INT( 11 ) NOT NULL; 

ALTER TABLE `client` ADD `admin_check` INT NOT NULL ;

CREATE TABLE IF NOT EXISTS `group` (
  `Id` int(11) NOT NULL auto_increment,
  `Name` varchar(255) collate utf8_czech_ci NOT NULL,
  `TablePrefix` varchar(255) collate utf8_czech_ci NOT NULL,
  `MangosTable` varchar(255) collate utf8_czech_ci NOT NULL,
  `MangosTableIndex` varchar(255) collate utf8_czech_ci NOT NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=10 ;

INSERT INTO `group` (`Id`, `Name`, `TablePrefix`, `MangosTable`, `MangosTableIndex`) VALUES
(1, 'Výpravy', 'quests', 'quest_template', 'entry'),
(2, 'Texty knížek', 'page', 'page_text', 'entry'),
(3, 'Slova NPC', 'npc', 'npc_text', 'ID'),
(4, 'Názvy věcí', 'item', 'item_template', 'entry'),
(5, 'Názvy herních objektů', 'gameobject', 'gameobject_template', 'entry'),
(6, 'Jména bytostí', 'creature', 'creature_template', 'entry'),
(7, 'Zprávy MaNGOSu', 'mangos_string', 'mangos_string', 'entry'),
(8, 'Popis GM příkazů', 'mangos_command', 'command', 'entry'),
(9, 'Klient', 'client', '', '');

CREATE TABLE IF NOT EXISTS `group_item` (
  `Id` int(11) NOT NULL auto_increment,
  `Group` int(11) NOT NULL,
  `Name` varchar(255) collate utf8_czech_ci NOT NULL,
  `Column` varchar(255) collate utf8_czech_ci NOT NULL,
  `MangosColumn` varchar(255) collate utf8_czech_ci NOT NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=38 ;

INSERT INTO `group_item` (`Id`, `Group`, `Name`, `Column`, `MangosColumn`) VALUES
(1, 1, 'Titulek', 'Title', 'Title'),
(2, 1, 'Detaily', 'Details', 'Details'),
(3, 1, 'Úkol', 'Objectives', 'Objectives'),
(4, 1, 'Text slíbené odměny', 'OfferRewardText', 'OfferRewardText'),
(5, 1, 'Popis požadovaných předmětů', 'RequestItemsText', 'RequestItemsText'),
(6, 1, 'Závěrečný text', 'EndText', 'EndText'),
(7, 1, 'Text úkolu 1', 'ObjectiveText1', 'ObjectiveText1'),
(8, 1, 'Text úkolu 2', 'ObjectiveText2', 'ObjectiveText2'),
(9, 1, 'Text úkolu 3', 'ObjectiveText3', 'ObjectiveText3'),
(10, 1, 'Text úkolu 4', 'ObjectiveText4', 'ObjectiveText4'),
(11, 2, 'Obsah', 'Text', 'Text'),
(12, 3, 'Text 0.0', 'Text0_0', 'Text0_0'),
(13, 3, 'Text 0.1', 'Text0_1', 'Text0_1'),
(14, 3, 'Text 1.0', 'Text1_0', 'Text1_0'),
(15, 3, 'Text 1.1', 'Text1_1', 'Text1_1'),
(16, 3, 'Text 2.0', 'Text2_0', 'Text2_0'),
(17, 3, 'Text 2.1', 'Text2_1', 'Text2_1'),
(18, 3, 'Text 3.0', 'Text3_0', 'Text3_0'),
(19, 3, 'Text 3.1', 'Text3_1', 'Text3_1'),
(20, 3, 'Text 4.0', 'Text4_0', 'Text4_0'),
(21, 3, 'Text 4.1', 'Text4_1', 'Text4_1'),
(22, 3, 'Text 5.0', 'Text5_0', 'Text5_0'),
(23, 3, 'Text 5.1', 'Text5_1', 'Text5_1'),
(24, 3, 'Text 6.0', 'Text6_0', 'Text6_0'),
(25, 3, 'Text 6.1', 'Text6_1', 'Text6_1'),
(26, 3, 'Text 7.0', 'Text7_0', 'Text7_0'),
(27, 3, 'Text 7.1', 'Text7_1', 'Text7_1'),
(28, 4, 'Jméno', 'Name', 'Name'),
(29, 4, 'Popis', 'Description', 'Description'),
(30, 5, 'Jméno', 'Name', 'Name'),
(31, 5, 'Popisek', 'castbarcaption', 'castbarcaption'),
(32, 6, 'Jméno', 'name', 'name'),
(33, 6, 'Druhé jméno', 'subname', 'subname'),
(34, 7, 'Obsah', 'content_default', 'content_default'),
(35, 8, 'Nápověda', 'help', 'help'),
(36, 9, 'Text', 'Text', '');

