/*M!999999\- enable the sandbox mode */ /*!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 utf8mb4 */; /*!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 */; DROP TABLE IF EXISTS `account`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `account` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Identifier', `username` varchar(32) NOT NULL DEFAULT '', `salt` binary(32) NOT NULL, `verifier` binary(32) NOT NULL, `session_key_auth` binary(40) DEFAULT NULL, `session_key_bnet` varbinary(64) DEFAULT NULL, `totp_secret` varbinary(128) DEFAULT NULL, `v` varchar(64) NOT NULL DEFAULT '', `s` varchar(64) NOT NULL DEFAULT '', `token_key` varchar(100) NOT NULL DEFAULT '', `email` varchar(255) NOT NULL DEFAULT '', `reg_mail` varchar(255) NOT NULL DEFAULT '', `joindate` timestamp NOT NULL DEFAULT current_timestamp(), `last_ip` varchar(15) NOT NULL DEFAULT '127.0.0.1', `last_attempt_ip` varchar(15) NOT NULL DEFAULT '127.0.0.1', `failed_logins` int(10) unsigned NOT NULL DEFAULT 0, `locked` tinyint(3) unsigned NOT NULL DEFAULT 0, `lock_country` varchar(2) NOT NULL DEFAULT '00', `last_login` timestamp NULL DEFAULT NULL, `online` tinyint(3) unsigned NOT NULL DEFAULT 0, `expansion` tinyint(3) unsigned NOT NULL DEFAULT 3, `mutetime` bigint(20) NOT NULL DEFAULT 0, `mutereason` varchar(255) NOT NULL DEFAULT '', `muteby` varchar(50) NOT NULL DEFAULT '', `locale` tinyint(3) unsigned NOT NULL DEFAULT 0, `os` varchar(5) DEFAULT NULL, `timezone_offset` smallint(6) NOT NULL DEFAULT 0, `recruiter` int(10) unsigned NOT NULL DEFAULT 0, PRIMARY KEY (`id`), UNIQUE KEY `idx_username` (`username`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Account System'; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `account_access`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `account_access` ( `AccountID` int(10) unsigned NOT NULL, `SecurityLevel` tinyint(3) unsigned NOT NULL, `RealmID` int(11) NOT NULL DEFAULT -1, PRIMARY KEY (`AccountID`,`RealmID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `account_banned`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `account_banned` ( `id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'Account id', `bandate` int(10) unsigned NOT NULL DEFAULT 0, `unbandate` int(10) unsigned NOT NULL DEFAULT 0, `bannedby` varchar(50) NOT NULL, `banreason` varchar(255) NOT NULL, `active` tinyint(3) unsigned NOT NULL DEFAULT 1, PRIMARY KEY (`id`,`bandate`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Ban List'; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `account_muted`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `account_muted` ( `guid` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'Global Unique Identifier', `mutedate` int(10) unsigned NOT NULL DEFAULT 0, `mutetime` int(10) unsigned NOT NULL DEFAULT 0, `mutedby` varchar(50) NOT NULL, `mutereason` varchar(255) NOT NULL, PRIMARY KEY (`guid`,`mutedate`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='mute List'; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `autobroadcast`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `autobroadcast` ( `realmid` int(11) NOT NULL DEFAULT -1, `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, `weight` tinyint(3) unsigned DEFAULT 1, `text` longtext NOT NULL, PRIMARY KEY (`id`,`realmid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `build_auth_key`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `build_auth_key` ( `build` int(11) NOT NULL, `platform` char(4) CHARACTER SET ascii COLLATE ascii_bin NOT NULL, `arch` char(4) CHARACTER SET ascii COLLATE ascii_bin NOT NULL, `type` char(4) CHARACTER SET ascii COLLATE ascii_bin NOT NULL, `key` binary(16) NOT NULL, PRIMARY KEY (`build`,`platform`,`arch`,`type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `build_executable_hash`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `build_executable_hash` ( `build` int(11) NOT NULL, `platform` char(4) CHARACTER SET ascii COLLATE ascii_bin NOT NULL, `executableHash` binary(20) NOT NULL, PRIMARY KEY (`build`,`platform`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `build_info`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `build_info` ( `build` int(11) NOT NULL, `majorVersion` int(11) DEFAULT NULL, `minorVersion` int(11) DEFAULT NULL, `bugfixVersion` int(11) DEFAULT NULL, `hotfixVersion` char(3) DEFAULT NULL, PRIMARY KEY (`build`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `ip_banned`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `ip_banned` ( `ip` varchar(15) NOT NULL DEFAULT '127.0.0.1', `bandate` int(10) unsigned NOT NULL, `unbandate` int(10) unsigned NOT NULL, `bannedby` varchar(50) NOT NULL DEFAULT '[Console]', `banreason` varchar(255) NOT NULL DEFAULT 'no reason', PRIMARY KEY (`ip`,`bandate`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Banned IPs'; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `logs`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `logs` ( `time` int(10) unsigned NOT NULL, `realm` int(10) unsigned NOT NULL, `type` varchar(250) NOT NULL, `level` tinyint(3) unsigned NOT NULL DEFAULT 0, `string` text CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `logs_ip_actions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `logs_ip_actions` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique Identifier', `account_id` int(10) unsigned NOT NULL COMMENT 'Account ID', `character_guid` int(10) unsigned NOT NULL COMMENT 'Character Guid', `type` tinyint(3) unsigned NOT NULL, `ip` varchar(15) NOT NULL DEFAULT '127.0.0.1', `systemnote` text DEFAULT NULL COMMENT 'Notes inserted by system', `unixtime` int(10) unsigned NOT NULL COMMENT 'Unixtime', `time` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Timestamp', `comment` text DEFAULT NULL COMMENT 'Allows users to add a comment', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Used to log ips of individual actions'; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `rbac_account_permissions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `rbac_account_permissions` ( `accountId` int(10) unsigned NOT NULL COMMENT 'Account id', `permissionId` int(10) unsigned NOT NULL COMMENT 'Permission id', `granted` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'Granted = 1, Denied = 0', `realmId` int(11) NOT NULL DEFAULT -1 COMMENT 'Realm Id, -1 means all', PRIMARY KEY (`accountId`,`permissionId`,`realmId`), KEY `fk__rbac_account_roles__rbac_permissions` (`permissionId`), CONSTRAINT `fk__rbac_account_permissions__account` FOREIGN KEY (`accountId`) REFERENCES `account` (`id`) ON DELETE CASCADE, CONSTRAINT `fk__rbac_account_roles__rbac_permissions` FOREIGN KEY (`permissionId`) REFERENCES `rbac_permissions` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Account-Permission relation'; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `rbac_default_permissions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `rbac_default_permissions` ( `secId` int(10) unsigned NOT NULL COMMENT 'Security Level id', `permissionId` int(10) unsigned NOT NULL COMMENT 'permission id', `realmId` int(11) NOT NULL DEFAULT -1 COMMENT 'Realm Id, -1 means all', PRIMARY KEY (`secId`,`permissionId`,`realmId`), KEY `fk__rbac_default_permissions__rbac_permissions` (`permissionId`), CONSTRAINT `fk__rbac_default_permissions__rbac_permissions` FOREIGN KEY (`permissionId`) REFERENCES `rbac_permissions` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Default permission to assign to different account security levels'; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `rbac_linked_permissions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `rbac_linked_permissions` ( `id` int(10) unsigned NOT NULL COMMENT 'Permission id', `linkedId` int(10) unsigned NOT NULL COMMENT 'Linked Permission id', PRIMARY KEY (`id`,`linkedId`), KEY `fk__rbac_linked_permissions__rbac_permissions1` (`id`), KEY `fk__rbac_linked_permissions__rbac_permissions2` (`linkedId`), CONSTRAINT `fk__rbac_linked_permissions__rbac_permissions1` FOREIGN KEY (`id`) REFERENCES `rbac_permissions` (`id`) ON DELETE CASCADE, CONSTRAINT `fk__rbac_linked_permissions__rbac_permissions2` FOREIGN KEY (`linkedId`) REFERENCES `rbac_permissions` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Permission - Linked Permission relation'; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `rbac_permissions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `rbac_permissions` ( `id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'Permission id', `name` varchar(100) NOT NULL COMMENT 'Permission name', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Permission List'; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `realmcharacters`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `realmcharacters` ( `realmid` int(10) unsigned NOT NULL DEFAULT 0, `acctid` int(10) unsigned NOT NULL, `numchars` tinyint(3) unsigned NOT NULL DEFAULT 0, PRIMARY KEY (`realmid`,`acctid`), KEY `acctid` (`acctid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Realm Character Tracker'; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `realmlist`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `realmlist` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(32) NOT NULL DEFAULT '', `address` varchar(255) NOT NULL DEFAULT '127.0.0.1', `localAddress` varchar(255) NOT NULL DEFAULT '127.0.0.1', `localSubnetMask` varchar(255) NOT NULL DEFAULT '255.255.255.0', `port` smallint(5) unsigned NOT NULL DEFAULT 8085, `icon` tinyint(3) unsigned NOT NULL DEFAULT 0, `flag` tinyint(3) unsigned NOT NULL DEFAULT 2, `timezone` tinyint(3) unsigned NOT NULL DEFAULT 0, `allowedSecurityLevel` tinyint(3) unsigned NOT NULL DEFAULT 0, `population` float unsigned NOT NULL DEFAULT 0, `gamebuild` int(10) unsigned NOT NULL DEFAULT 15595, `Region` tinyint(3) unsigned NOT NULL DEFAULT 2, `Battlegroup` tinyint(3) unsigned NOT NULL DEFAULT 1, PRIMARY KEY (`id`), UNIQUE KEY `idx_name` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Realm System'; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `secret_digest`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `secret_digest` ( `id` int(10) unsigned NOT NULL, `digest` varchar(100) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `updates`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `updates` ( `name` varchar(200) NOT NULL COMMENT 'filename with extension of the update.', `hash` char(40) DEFAULT '' COMMENT 'sha1 hash of the sql file.', `state` enum('RELEASED','ARCHIVED') NOT NULL DEFAULT 'RELEASED' COMMENT 'defines if an update is released or archived.', `timestamp` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'timestamp when the query was applied.', `speed` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'time the query takes to apply in ms.', PRIMARY KEY (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='List of all applied updates in this database.'; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `updates_include`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `updates_include` ( `path` varchar(200) NOT NULL COMMENT 'directory to include. $ means relative to the source directory.', `state` enum('RELEASED','ARCHIVED') NOT NULL DEFAULT 'RELEASED' COMMENT 'defines if the directory contains released or archived updates.', PRIMARY KEY (`path`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='List of directories where we want to include sql updates.'; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `uptime`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `uptime` ( `realmid` int(10) unsigned NOT NULL, `starttime` int(10) unsigned NOT NULL DEFAULT 0, `uptime` int(10) unsigned NOT NULL DEFAULT 0, `maxplayers` smallint(5) unsigned NOT NULL DEFAULT 0, `revision` varchar(255) NOT NULL DEFAULT 'Trinitycore', PRIMARY KEY (`realmid`,`starttime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Uptime system'; /*!40101 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 */;