-- MySQL dump 10.11
--
-- Host: localhost    Database: mumble
-- ------------------------------------------------------
-- Server version	5.0.51a-15-log

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

use mumble;

--
-- Table structure for table `murmur_acl`
--

DROP TABLE IF EXISTS `murmur_acl`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `murmur_acl` (
  `server_id` int(11) NOT NULL,
  `channel_id` int(11) NOT NULL,
  `priority` int(11) default NULL,
  `player_id` int(11) default NULL,
  `group_name` varchar(255) collate utf8_unicode_ci default NULL,
  `apply_here` int(11) default NULL,
  `apply_sub` int(11) default NULL,
  `grantpriv` int(11) default NULL,
  `revokepriv` int(11) default NULL,
  UNIQUE KEY `murmur_acl_channel_pri` (`server_id`,`channel_id`,`priority`),
  KEY `murmur_acl_player` (`server_id`,`player_id`),
  CONSTRAINT `murmur_acl_del_channel` FOREIGN KEY (`server_id`, `channel_id`) REFERENCES `murmur_channels` (`server_id`, `channel_id`) ON DELETE CASCADE,
  CONSTRAINT `murmur_acl_del_player` FOREIGN KEY (`server_id`, `player_id`) REFERENCES `murmur_players` (`server_id`, `player_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `murmur_bans`
--

DROP TABLE IF EXISTS `murmur_bans`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `murmur_bans` (
  `server_id` int(11) NOT NULL,
  `base` int(11) default NULL,
  `mask` int(11) default NULL,
  KEY `murmur_bans_del_server` (`server_id`),
  CONSTRAINT `murmur_bans_del_server` FOREIGN KEY (`server_id`) REFERENCES `murmur_servers` (`server_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `murmur_channel_links`
--

DROP TABLE IF EXISTS `murmur_channel_links`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `murmur_channel_links` (
  `server_id` int(11) NOT NULL,
  `channel_id` int(11) NOT NULL,
  `link_id` int(11) NOT NULL,
  KEY `murmur_channel_links_del_channel` (`server_id`,`channel_id`),
  CONSTRAINT `murmur_channel_links_del_channel` FOREIGN KEY (`server_id`, `channel_id`) REFERENCES `murmur_channels` (`server_id`, `channel_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `murmur_channels`
--

DROP TABLE IF EXISTS `murmur_channels`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `murmur_channels` (
  `server_id` int(11) NOT NULL,
  `channel_id` int(11) NOT NULL,
  `parent_id` int(11) default NULL,
  `name` varchar(255) collate utf8_unicode_ci default NULL,
  `inheritacl` int(11) default NULL,
  UNIQUE KEY `murmur_channel_id` (`server_id`,`channel_id`),
  KEY `murmur_channels_parent_del` (`server_id`,`parent_id`),
  CONSTRAINT `murmur_channels_parent_del` FOREIGN KEY (`server_id`, `parent_id`) REFERENCES `murmur_channels` (`server_id`, `channel_id`) ON DELETE CASCADE,
  CONSTRAINT `murmur_channels_server_del` FOREIGN KEY (`server_id`) REFERENCES `murmur_servers` (`server_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
SET character_set_client = @saved_cs_client;


--
-- Table structure for table `murmur_config`
--

DROP TABLE IF EXISTS `murmur_config`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `murmur_config` (
  `server_id` int(11) NOT NULL,
  `keystring` varchar(255) collate utf8_unicode_ci default NULL,
  `value` text collate utf8_unicode_ci,
  UNIQUE KEY `murmur_config_key` (`server_id`,`keystring`),
  CONSTRAINT `murmur_config_server_del` FOREIGN KEY (`server_id`) REFERENCES `murmur_servers` (`server_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `murmur_group_members`
--

DROP TABLE IF EXISTS `murmur_group_members`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `murmur_group_members` (
  `group_id` int(11) NOT NULL,
  `server_id` int(11) NOT NULL,
  `player_id` int(11) NOT NULL,
  `addit` int(11) default NULL,
  KEY `murmur_group_members_players` (`server_id`,`player_id`),
  KEY `murmur_group_members_del_group` (`group_id`),
  CONSTRAINT `murmur_group_members_del_group` FOREIGN KEY (`group_id`) REFERENCES `murmur_groups` (`group_id`) ON DELETE CASCADE,
  CONSTRAINT `murmur_group_members_del_player` FOREIGN KEY (`server_id`, `player_id`) REFERENCES `murmur_players` (`server_id`, `player_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `murmur_groups`
--

DROP TABLE IF EXISTS `murmur_groups`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `murmur_groups` (
  `group_id` int(11) NOT NULL auto_increment,
  `server_id` int(11) NOT NULL,
  `name` varchar(255) collate utf8_unicode_ci default NULL,
  `channel_id` int(11) NOT NULL,
  `inherit` int(11) default NULL,
  `inheritable` int(11) default NULL,
  PRIMARY KEY  (`group_id`),
  UNIQUE KEY `murmur_groups_name_channels` (`server_id`,`channel_id`,`name`),
  CONSTRAINT `murmur_groups_del_channel` FOREIGN KEY (`server_id`, `channel_id`) REFERENCES `murmur_channels` (`server_id`, `channel_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=171 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `murmur_meta`
--

DROP TABLE IF EXISTS `murmur_meta`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `murmur_meta` (
  `keystring` varchar(255) collate utf8_unicode_ci NOT NULL,
  `value` varchar(255) collate utf8_unicode_ci default NULL,
  PRIMARY KEY  (`keystring`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `murmur_player_auth`
--

DROP TABLE IF EXISTS `murmur_player_auth`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `murmur_player_auth` (
  `player_auth_id` int(11) NOT NULL auto_increment,
  `name` varchar(255) collate utf8_unicode_ci default NULL,
  `pw` varchar(128) collate utf8_unicode_ci default NULL,
  `email` varchar(255) collate utf8_unicode_ci default NULL,
  `authcode` varchar(255) collate utf8_unicode_ci default NULL,
  PRIMARY KEY  (`player_auth_id`),
  UNIQUE KEY `murmur_player_auth_name` (`name`),
  UNIQUE KEY `murmur_player_auth_code` (`authcode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
SET character_set_client = @saved_cs_client;


--
-- Table structure for table `murmur_players`
--

DROP TABLE IF EXISTS `murmur_players`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `murmur_players` (
  `server_id` int(11) NOT NULL,
  `player_id` int(11) NOT NULL auto_increment,
  `name` varchar(255) collate utf8_unicode_ci default NULL,
  `email` varchar(255) collate utf8_unicode_ci default NULL,
  `pw` varchar(128) collate utf8_unicode_ci default NULL,
  `lastchannel` int(11) default NULL,
  `texture` longblob,
  `last_active` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`player_id`),
  UNIQUE KEY `murmur_players_id` (`server_id`,`player_id`),
  UNIQUE KEY `murmur_players_name` (`server_id`,`name`),
  KEY `murmur_players_channel` (`server_id`,`lastchannel`),
  CONSTRAINT `murmur_players_server_del` FOREIGN KEY (`server_id`) REFERENCES `murmur_servers` (`server_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `murmur_servers`
--

DROP TABLE IF EXISTS `murmur_servers`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `murmur_servers` (
  `server_id` int(11) NOT NULL auto_increment,
  PRIMARY KEY  (`server_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `murmur_slog`
--

DROP TABLE IF EXISTS `murmur_slog`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `murmur_slog` (
  `server_id` int(11) NOT NULL,
  `msg` text collate utf8_unicode_ci,
  `msgtime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  KEY `murmur_slog_time` (`msgtime`),
  KEY `murmur_slog_server_del` (`server_id`),
  CONSTRAINT `murmur_slog_server_del` FOREIGN KEY (`server_id`) REFERENCES `murmur_servers` (`server_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
SET character_set_client = @saved_cs_client;

/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2008-11-14  4:52:02
