From d5ed35d619795ac607fd8604707b64a445c75f30 Mon Sep 17 00:00:00 2001 From: hecht Date: Tue, 7 Nov 2017 17:23:19 +0000 Subject: [PATCH] updated database schema --- db/animegame_svn.sql | 394 ++++++++++++++++++++++++++----------------- 1 file changed, 242 insertions(+), 152 deletions(-) diff --git a/db/animegame_svn.sql b/db/animegame_svn.sql index a5abbf8..8ce7a04 100644 --- a/db/animegame_svn.sql +++ b/db/animegame_svn.sql @@ -1,8 +1,8 @@ --- MySQL dump 10.13 Distrib 5.5.43, for debian-linux-gnu (x86_64) +-- MySQL dump 10.15 Distrib 10.0.31-MariaDB, for debian-linux-gnu (x86_64) -- -- Host: 10.8.0.1 Database: ag_server_2 -- ------------------------------------------------------ --- Server version 5.5.43-0ubuntu0.12.04.1 +-- Server version 5.7.20-0ubuntu0.16.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -171,6 +171,7 @@ DROP TABLE IF EXISTS `auktion`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `auktion` ( `auktionsid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `type` int(11) NOT NULL DEFAULT '1', `anbieter` int(11) DEFAULT NULL, `bieter` int(11) DEFAULT NULL, `itemid` int(10) unsigned NOT NULL, @@ -199,6 +200,7 @@ DROP TABLE IF EXISTS `auktion_transaktionen`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `auktion_transaktionen` ( `transaktionsid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `type` int(11) NOT NULL DEFAULT '1', `anbieter` int(11) DEFAULT NULL, `bieter` int(11) DEFAULT NULL, `itemid` int(10) unsigned NOT NULL, @@ -215,6 +217,27 @@ CREATE TABLE `auktion_transaktionen` ( ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `blog` +-- + +DROP TABLE IF EXISTS `blog`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `blog` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `author` varchar(100) COLLATE utf8_unicode_ci NOT NULL, + `blog` longtext COLLATE utf8_unicode_ci NOT NULL, + `image` varchar(20) COLLATE utf8_unicode_ci NOT NULL, + `tags` longtext COLLATE utf8_unicode_ci NOT NULL, + `created` datetime NOT NULL, + `updated` datetime NOT NULL, + `slug` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Table structure for table `bot_image_failures` -- @@ -276,8 +299,7 @@ DROP TABLE IF EXISTS `chars`; CREATE TABLE `chars` ( `level` int(3) NOT NULL DEFAULT '1', `name` varchar(40) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', - `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', - `rasse` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `rasse` int(11) NOT NULL DEFAULT '0', `bild` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `bild_edit` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `besitzer` int(11) NOT NULL DEFAULT '0', @@ -303,10 +325,9 @@ CREATE TABLE `chars` ( `aufgeben` int(3) NOT NULL DEFAULT '0', `liga_punkte` int(55) NOT NULL DEFAULT '0', `fusion` varchar(4) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'nein', - `fusion_rasse` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', + `fusion_rasse` int(11) NOT NULL DEFAULT '0', `training` text COLLATE utf8_unicode_ci NOT NULL, `lernpunkte` int(5) NOT NULL DEFAULT '10', - `char_type` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `frucht` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `kampf_item` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0,0,0,0,0', `ort` int(11) NOT NULL DEFAULT '13', @@ -613,6 +634,27 @@ CREATE TABLE `clan_ware` ( ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `comment` +-- + +DROP TABLE IF EXISTS `comment`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `comment` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `blog_id` int(11) DEFAULT NULL, + `user` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `comment` longtext COLLATE utf8_unicode_ci NOT NULL, + `approved` tinyint(1) NOT NULL, + `created` datetime NOT NULL, + `updated` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `IDX_9474526CDAE07E97` (`blog_id`), + CONSTRAINT `FK_9474526CDAE07E97` FOREIGN KEY (`blog_id`) REFERENCES `blog` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Table structure for table `defines` -- @@ -628,6 +670,23 @@ CREATE TABLE `defines` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `event_char_metadata` +-- + +DROP TABLE IF EXISTS `event_char_metadata`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `event_char_metadata` ( + `event_id` int(10) unsigned NOT NULL, + `event_char_id` int(10) unsigned NOT NULL, + `key` varchar(20) NOT NULL, + `value` varchar(20) NOT NULL, + PRIMARY KEY (`event_id`,`event_char_id`,`key`), + CONSTRAINT `fk_event_char_metadata_1` FOREIGN KEY (`event_id`, `event_char_id`) REFERENCES `event_chars` (`event_id`, `event_char_id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Table structure for table `event_chars` -- @@ -827,9 +886,12 @@ CREATE TABLE `highscore` ( `charname` varchar(40) COLLATE utf8_unicode_ci NOT NULL, `userid` int(11) DEFAULT NULL, `username` varchar(40) COLLATE utf8_unicode_ci NOT NULL, + `tournament_id` int(11) DEFAULT NULL, PRIMARY KEY (`art`,`datum`), KEY `fk_highscore_charid` (`charid`), KEY `fk_highscore_userid` (`userid`), + KEY `fk_highscore_1_idx` (`tournament_id`), + CONSTRAINT `fk_highscore_1` FOREIGN KEY (`tournament_id`) REFERENCES `tournament` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `fk_highscore_charid` FOREIGN KEY (`charid`) REFERENCES `chars` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `fk_highscore_userid` FOREIGN KEY (`userid`) REFERENCES `user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -854,6 +916,25 @@ CREATE TABLE `ignolist` ( ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `inverse_auktion_gebote` +-- + +DROP TABLE IF EXISTS `inverse_auktion_gebote`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `inverse_auktion_gebote` ( + `auktionsid` int(10) unsigned NOT NULL, + `bieter` int(11) NOT NULL, + `range_from` int(11) NOT NULL, + `range_to` int(11) NOT NULL, + KEY `fk_inverse_auktion_gebote_2_idx` (`bieter`), + KEY `inverse_auktion_gebote_auktionsid_idx` (`auktionsid`), + CONSTRAINT `fk_inverse_auktion_gebote_1` FOREIGN KEY (`auktionsid`) REFERENCES `auktion` (`auktionsid`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_inverse_auktion_gebote_2` FOREIGN KEY (`bieter`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Table structure for table `item` -- @@ -871,7 +952,7 @@ CREATE TABLE `item` ( `s_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `preis` int(20) NOT NULL DEFAULT '0', `anzahl` int(20) NOT NULL DEFAULT '0', - `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `rassen_type` int(11) DEFAULT NULL, `id` int(11) NOT NULL AUTO_INCREMENT, `info` text COLLATE utf8_unicode_ci NOT NULL, `level` int(20) NOT NULL DEFAULT '0', @@ -879,8 +960,9 @@ CREATE TABLE `item` ( `tausch_anzahl` int(4) NOT NULL DEFAULT '1', PRIMARY KEY (`id`), KEY `anzahl` (`anzahl`), - KEY `type` (`type`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + KEY `fk_item_1_idx` (`rassen_type`), + CONSTRAINT `fk_item_1` FOREIGN KEY (`rassen_type`) REFERENCES `rassen_type` (`id`) ON DELETE SET NULL ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1198,7 +1280,7 @@ CREATE TABLE `poll_votes` ( PRIMARY KEY (`pollid`,`userid`), KEY `fk_poll_votes_pollid` (`pollid`,`polloptionid`), CONSTRAINT `fk_poll_votes_pollid` FOREIGN KEY (`pollid`, `polloptionid`) REFERENCES `poll_options` (`pollid`, `polloptionid`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1220,6 +1302,21 @@ CREATE TABLE `quest_fights` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='in dieser Tabelle werden die Fights eingetragen'; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `quest_item_stats` +-- + +DROP TABLE IF EXISTS `quest_item_stats`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `quest_item_stats` ( + `id` int(11) NOT NULL, + `monster` int(11) NOT NULL, + `anzahl` int(11) NOT NULL DEFAULT '1', + PRIMARY KEY (`id`,`monster`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Table structure for table `quest_monster` -- @@ -1320,6 +1417,22 @@ CREATE TABLE `quest_rounds` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Hier sind die einzelnen Rounden der Fights eingetragen'; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `quest_stats` +-- + +DROP TABLE IF EXISTS `quest_stats`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `quest_stats` ( + `monster` int(11) NOT NULL, + `zeit` int(11) NOT NULL, + `anzahl` int(11) NOT NULL DEFAULT '1', + `status` tinyint(4) NOT NULL, + PRIMARY KEY (`monster`,`zeit`,`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Table structure for table `quests` -- @@ -1330,7 +1443,7 @@ DROP TABLE IF EXISTS `quests`; CREATE TABLE `quests` ( `charid` int(11) NOT NULL, `dauer` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `cancel` timestamp NULL, + `cancel` timestamp NULL DEFAULT NULL, `st` int(11) NOT NULL, `sp` int(11) NOT NULL, `ver` int(11) NOT NULL, @@ -1339,7 +1452,7 @@ CREATE TABLE `quests` ( `hp` int(11) NOT NULL, `mp` int(11) NOT NULL, `ortid` int(11) DEFAULT '13', - `std` INT NOT NULL DEFAULT 0, + `std` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`charid`), KEY `fk_quests_ortid` (`ortid`), CONSTRAINT `fk_quests_charid` FOREIGN KEY (`charid`) REFERENCES `chars` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, @@ -1347,21 +1460,6 @@ CREATE TABLE `quests` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -CREATE TABLE `test_ag`.`quest_stats` ( - `monster` INT NOT NULL, - `zeit` INT NOT NULL, - `anzahl` INT NOT NULL DEFAULT 1, - `status` TINYINT NOT NULL, - PRIMARY KEY (`monster`, `zeit`, `status`)); - - -CREATE TABLE `test_ag`.`quest_item_stats` ( - `id` INT NOT NULL, - `monster` INT NOT NULL, - `anzahl` INT NOT NULL DEFAULT 1, - PRIMARY KEY (`id`, `monster`)); - - -- -- Table structure for table `rassen` -- @@ -1381,6 +1479,7 @@ CREATE TABLE `rassen` ( `lck` int(11) NOT NULL DEFAULT '0', `stm` int(11) NOT NULL DEFAULT '0', `special` tinyint(4) NOT NULL DEFAULT '0', + `item` int(11) DEFAULT NULL, PRIMARY KEY (`id`), KEY `fk_rassen_type` (`type`), CONSTRAINT `fk_rassen_type` FOREIGN KEY (`type`) REFERENCES `rassen_type` (`id`) ON UPDATE CASCADE @@ -1472,6 +1571,54 @@ CREATE TABLE `sp_item` ( ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `sp_set_ingredient` +-- + +DROP TABLE IF EXISTS `sp_set_ingredient`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `sp_set_ingredient` ( + `set_id` int(11) NOT NULL, + `table_name` varchar(15) NOT NULL, + `item_id` int(11) NOT NULL, + PRIMARY KEY (`set_id`,`table_name`,`item_id`), + CONSTRAINT `fk_sp_set_ingredient_1` FOREIGN KEY (`set_id`) REFERENCES `sp_sets` (`set_id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `sp_set_topics` +-- + +DROP TABLE IF EXISTS `sp_set_topics`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `sp_set_topics` ( + `id` int(11) NOT NULL, + `name` varchar(45) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `sp_sets` +-- + +DROP TABLE IF EXISTS `sp_sets`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `sp_sets` ( + `set_id` int(11) NOT NULL AUTO_INCREMENT, + `table_name` varchar(15) DEFAULT NULL, + `item_id` int(11) DEFAULT NULL, + `set_topic_id` int(11) DEFAULT NULL, + PRIMARY KEY (`set_id`), + KEY `fk_sp_sets_topic_idx` (`set_topic_id`), + CONSTRAINT `fk_sp_sets_topic` FOREIGN KEY (`set_topic_id`) REFERENCES `sp_set_topics` (`id`) ON DELETE SET NULL ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Table structure for table `sp_ware` -- @@ -1618,171 +1765,112 @@ CREATE TABLE `top_kampf` ( /*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `transaktionen` +-- Table structure for table `tournament` -- -DROP TABLE IF EXISTS `transaktionen`; +DROP TABLE IF EXISTS `tournament`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `transaktionen` ( - `kaeufer` int(11) DEFAULT NULL, - `verkaeufer` int(11) DEFAULT NULL, - `item` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `anzahl` int(10) DEFAULT NULL, - `verkaeufer_ip` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, - `kaeufer_ip` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, - `betrag` int(30) DEFAULT NULL, - `zeit` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - KEY `Kaeufer` (`kaeufer`,`verkaeufer`,`zeit`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +CREATE TABLE `tournament` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `type` int(11) DEFAULT NULL, + `datum` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `event_id` int(11) unsigned NOT NULL, + `ausgewertet` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `fk_turniere_1_idx` (`event_id`), + KEY `fk_tournament_2_idx` (`type`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `turnier1` +-- Table structure for table `tournament_registration` -- -DROP TABLE IF EXISTS `turnier1`; +DROP TABLE IF EXISTS `tournament_registration`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `turnier1` ( +CREATE TABLE `tournament_registration` ( `id` int(11) NOT NULL AUTO_INCREMENT, `besitzer` int(20) NOT NULL DEFAULT '0', `charakter` int(25) NOT NULL DEFAULT '0', - `art` char(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'wochen', + `type` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `besitzer` (`besitzer`), KEY `charakter` (`charakter`), + KEY `fk_turnier1_1_idx` (`type`), + CONSTRAINT `fk_turnier1_1` FOREIGN KEY (`type`) REFERENCES `tournament_types` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `turnier1_besitzer` FOREIGN KEY (`besitzer`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `turnier1_char` FOREIGN KEY (`charakter`) REFERENCES `chars` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `turnier_gebuehr` --- - -DROP TABLE IF EXISTS `turnier_gebuehr`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `turnier_gebuehr` ( - `art` varchar(10) COLLATE utf8_unicode_ci NOT NULL, - `gebuehr` int(11) NOT NULL DEFAULT '0' -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `turnier_instances` --- - -DROP TABLE IF EXISTS `turnier_instances`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `turnier_instances` ( - `turnier_id` int(10) unsigned NOT NULL, - `event_id` int(10) unsigned NOT NULL, - `turnier_version` int(10) unsigned NOT NULL, - `turnier_type_id` int(10) unsigned NOT NULL, - PRIMARY KEY (`turnier_id`,`event_id`,`turnier_version`,`turnier_type_id`), - KEY `fk_turnier_instances_turnier_verisons` (`turnier_type_id`,`turnier_version`), - KEY `fk_turnier_instances_events` (`event_id`,`turnier_id`), - CONSTRAINT `fk_turnier_instances_turnier_verisons` FOREIGN KEY (`turnier_type_id`, `turnier_version`) REFERENCES `turnier_versions` (`turnier_type_id`, `turnier_version`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `turnier_kampf` +-- Table structure for table `tournament_types` -- -DROP TABLE IF EXISTS `turnier_kampf`; +DROP TABLE IF EXISTS `tournament_types`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `turnier_kampf` ( - `hp1` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', - `hp2` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', - `mp1` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', - `mp2` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', - `attacke1` text COLLATE utf8_unicode_ci NOT NULL, - `attacke2` text COLLATE utf8_unicode_ci NOT NULL, - `schaden1` text COLLATE utf8_unicode_ci NOT NULL, - `schaden2` text COLLATE utf8_unicode_ci NOT NULL, +CREATE TABLE `tournament_types` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `char1` int(20) NOT NULL DEFAULT '0', - `char2` int(20) NOT NULL DEFAULT '0', - `starke1` text COLLATE utf8_unicode_ci NOT NULL, - `ver1` text COLLATE utf8_unicode_ci NOT NULL, - `speed1` text COLLATE utf8_unicode_ci NOT NULL, - `starke2` text COLLATE utf8_unicode_ci NOT NULL, - `ver2` text COLLATE utf8_unicode_ci NOT NULL, - `speed2` text COLLATE utf8_unicode_ci NOT NULL, - `ausdauer1` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', - `ausdauer2` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', - `glueck1` text COLLATE utf8_unicode_ci NOT NULL, - `glueck2` text COLLATE utf8_unicode_ci NOT NULL, - `exp1` int(20) NOT NULL DEFAULT '0', - `exp2` int(20) NOT NULL DEFAULT '0', - `geld1` int(10) NOT NULL DEFAULT '0', - `geld2` int(10) NOT NULL DEFAULT '0', - `arena_geld` int(20) NOT NULL DEFAULT '0', - `besucher` int(20) NOT NULL DEFAULT '0', - `win` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', - `lose` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', - `arena_name` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', - `db_satz` int(20) NOT NULL DEFAULT '0', - `dauer` int(50) NOT NULL DEFAULT '0', - `art` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', - `art2` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', - `preis` int(20) NOT NULL DEFAULT '0', - `round` int(2) NOT NULL DEFAULT '0', + `name` varchar(45) NOT NULL, + `abbrevation` varchar(20) DEFAULT NULL, + `icon` varchar(45) NOT NULL DEFAULT '', + `competitors` int(11) NOT NULL, + `excl_fusions` tinyint(4) NOT NULL DEFAULT '1', + `excl_winners` tinyint(4) NOT NULL DEFAULT '1', + `excl_fusion_particip_count` int(11) NOT NULL DEFAULT '0', + `excl_particip_count` int(11) NOT NULL DEFAULT '0', + `excl_special_chars` int(11) NOT NULL DEFAULT '0', + `min_level` int(11) NOT NULL DEFAULT '1', + `max_level` int(11) DEFAULT NULL, + `gain` int(11) NOT NULL DEFAULT '0', + `randomize` tinyint(4) NOT NULL DEFAULT '1', + `without_equip` tinyint(4) NOT NULL DEFAULT '0', + `fruit_chance` int(11) NOT NULL DEFAULT '0', + `fruit_type` varchar(45) DEFAULT NULL, + `day_of_week` int(11) DEFAULT NULL, + `day_of_month` int(11) DEFAULT NULL, + `hour_of_day` int(11) DEFAULT '0', + `entrance_fee` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), - KEY `char1` (`char1`), - KEY `char2` (`char2`), - KEY `round` (`round`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + UNIQUE KEY `name_UNIQUE` (`name`), + UNIQUE KEY `abbrevation_UNIQUE` (`abbrevation`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `turnier_types` +-- Table structure for table `transaktionen` -- -DROP TABLE IF EXISTS `turnier_types`; +DROP TABLE IF EXISTS `transaktionen`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `turnier_types` ( - `turnier_type_id` int(10) unsigned NOT NULL, - `turnier_type_name` varchar(30) NOT NULL, - PRIMARY KEY (`turnier_type_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `transaktionen` ( + `kaeufer` int(11) DEFAULT NULL, + `verkaeufer` int(11) DEFAULT NULL, + `item` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `anzahl` int(10) DEFAULT NULL, + `verkaeufer_ip` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + `kaeufer_ip` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + `betrag` int(30) DEFAULT NULL, + `zeit` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + KEY `Kaeufer` (`kaeufer`,`verkaeufer`,`zeit`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `turnier_versions` +-- Table structure for table `tutorial` -- -DROP TABLE IF EXISTS `turnier_versions`; +DROP TABLE IF EXISTS `tutorial`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `turnier_versions` ( - `turnier_type_id` int(10) unsigned NOT NULL, - `turnier_version` int(10) unsigned NOT NULL, - `fusion_chars` tinyint(1) NOT NULL, - `special_chars` tinyint(1) NOT NULL, - `min_level` int(10) unsigned DEFAULT NULL, - `max_level` int(10) unsigned DEFAULT NULL, - `gain` varchar(10) NOT NULL, - `randomize` tinyint(1) NOT NULL, - `fight_duration` int(10) unsigned DEFAULT NULL, - `anzahl` int(10) unsigned DEFAULT NULL, - `frucht_chars` tinyint(1) NOT NULL, - `max_wins` int(10) unsigned DEFAULT NULL, - `valid_from` date NOT NULL, - `repeat_type` int(10) unsigned DEFAULT NULL, - `repeat_param` int(10) unsigned DEFAULT NULL, - `start_time` time NOT NULL, - `persist_winner` tinyint(1) NOT NULL, - `exp_per_round` int(11) NOT NULL, - `mon_per_round` int(11) NOT NULL, - PRIMARY KEY (`turnier_type_id`,`turnier_version`), - CONSTRAINT `fk_turnier_versions_turnier_types` FOREIGN KEY (`turnier_type_id`) REFERENCES `turnier_types` (`turnier_type_id`) ON DELETE CASCADE ON UPDATE CASCADE +CREATE TABLE `tutorial` ( + `id` int(11) NOT NULL, + `content` text, + PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1870,7 +1958,7 @@ DROP TABLE IF EXISTS `user_adblock`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `user_adblock` ( `userid` int(11) NOT NULL, - `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`userid`,`time`), CONSTRAINT `user_adblock_userid` FOREIGN KEY (`userid`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -1887,6 +1975,8 @@ CREATE TABLE `user_clan` ( `spende` bigint(20) NOT NULL, `userid` int(11) NOT NULL, `clanid` int(11) NOT NULL, + `spende_today` int(11) NOT NULL DEFAULT '0', + `spende_yesterday` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`userid`,`clanid`), KEY `fk_user_clan_clanid` (`clanid`), CONSTRAINT `fk_user_clan_clanid` FOREIGN KEY (`clanid`) REFERENCES `clan` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, @@ -2067,7 +2157,7 @@ CREATE TABLE `wanted_kampf` ( PRIMARY KEY (`id`), KEY `char1` (`char1`), KEY `char2` (`char2`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2150,4 +2240,4 @@ CREATE TABLE `wochen_ware` ( /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2015-06-09 22:43:55 +-- Dump completed on 2017-11-07 18:11:45