DB: converted auth database to utf8mb4

This commit is contained in:
Ovahlord
2021-12-31 18:39:11 +01:00
parent dbcdf3105d
commit cc5ddf1faa
2 changed files with 65 additions and 43 deletions

View File

@@ -21,7 +21,7 @@
DROP TABLE IF EXISTS `account`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!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 '',
@@ -53,7 +53,7 @@ CREATE TABLE `account` (
UNIQUE KEY `idx_username` (`username`),
UNIQUE KEY `uk_bnet_acc` (`battlenet_account`,`battlenet_index`),
CONSTRAINT `fk_bnet_acc` FOREIGN KEY (`battlenet_account`) REFERENCES `battlenet_accounts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Account System';
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Account System';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -71,13 +71,13 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `account_access`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `account_access` (
`id` int(10) unsigned NOT NULL,
`gmlevel` tinyint(3) unsigned NOT NULL,
`RealmID` int(11) NOT NULL DEFAULT '-1',
PRIMARY KEY (`id`,`RealmID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -95,7 +95,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `account_banned`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!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',
@@ -104,7 +104,7 @@ CREATE TABLE `account_banned` (
`banreason` varchar(255) NOT NULL,
`active` tinyint(3) unsigned NOT NULL DEFAULT '1',
PRIMARY KEY (`id`,`bandate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Ban List';
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Ban List';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -122,7 +122,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `account_muted`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!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',
@@ -130,7 +130,7 @@ CREATE TABLE `account_muted` (
`mutedby` varchar(50) NOT NULL,
`mutereason` varchar(255) NOT NULL,
PRIMARY KEY (`guid`,`mutedate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='mute List';
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='mute List';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -148,14 +148,14 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `autobroadcast`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!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=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -173,7 +173,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `battlenet_account_bans`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `battlenet_account_bans` (
`id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Account id',
`bandate` int(10) unsigned NOT NULL DEFAULT '0',
@@ -181,7 +181,7 @@ CREATE TABLE `battlenet_account_bans` (
`bannedby` varchar(50) NOT NULL,
`banreason` varchar(255) NOT NULL,
PRIMARY KEY (`id`,`bandate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Ban List';
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Ban List';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -199,7 +199,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `battlenet_accounts`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `battlenet_accounts` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Identifier',
`email` varchar(320) NOT NULL,
@@ -217,7 +217,7 @@ CREATE TABLE `battlenet_accounts` (
`locale` tinyint(3) unsigned NOT NULL DEFAULT '0',
`os` varchar(5) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Account System';
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Account System';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -235,13 +235,13 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `battlenet_components`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `battlenet_components` (
`Program` varchar(4) NOT NULL,
`Platform` varchar(4) NOT NULL,
`Build` int(11) unsigned NOT NULL,
PRIMARY KEY (`Program`,`Platform`,`Build`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -288,7 +288,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `battlenet_modules`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `battlenet_modules` (
`Hash` varchar(64) NOT NULL,
`Name` varchar(64) NOT NULL DEFAULT '',
@@ -297,7 +297,7 @@ CREATE TABLE `battlenet_modules` (
`Data` text,
PRIMARY KEY (`Name`,`System`),
UNIQUE KEY `uk_name_type_system` (`Name`,`Type`,`System`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -359,7 +359,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `ip_banned`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!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,
@@ -367,7 +367,7 @@ CREATE TABLE `ip_banned` (
`bannedby` varchar(50) NOT NULL DEFAULT '[Console]',
`banreason` varchar(255) NOT NULL DEFAULT 'no reason',
PRIMARY KEY (`ip`,`bandate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Banned IPs';
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Banned IPs';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -385,14 +385,14 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `logs`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!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
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -410,7 +410,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `logs_ip_actions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!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',
@@ -422,7 +422,7 @@ CREATE TABLE `logs_ip_actions` (
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Timestamp',
`comment` text COMMENT 'Allows users to add a comment',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Used to log ips of individual actions';
) 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 */;
--
@@ -440,7 +440,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `rbac_account_permissions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!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',
@@ -450,7 +450,7 @@ CREATE TABLE `rbac_account_permissions` (
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=utf8 COMMENT='Account-Permission relation';
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Account-Permission relation';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -468,7 +468,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `rbac_default_permissions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!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',
@@ -476,7 +476,7 @@ CREATE TABLE `rbac_default_permissions` (
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=utf8 COMMENT='Default permission to assign to different account security levels';
) 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 */;
--
@@ -499,7 +499,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `rbac_linked_permissions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!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',
@@ -508,7 +508,7 @@ CREATE TABLE `rbac_linked_permissions` (
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=utf8 COMMENT='Permission - Linked Permission relation';
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Permission - Linked Permission relation';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -1174,12 +1174,12 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `rbac_permissions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!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=utf8 COMMENT='Permission List';
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Permission List';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -1860,14 +1860,14 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `realmcharacters`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!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=utf8 COMMENT='Realm Character Tracker';
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Realm Character Tracker';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -1885,7 +1885,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `realmlist`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `realmlist` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(32) NOT NULL DEFAULT '',
@@ -1903,7 +1903,7 @@ CREATE TABLE `realmlist` (
`Battlegroup` tinyint(3) unsigned NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `idx_name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='Realm System';
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Realm System';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -1923,7 +1923,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `updates`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!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.',
@@ -1931,7 +1931,7 @@ CREATE TABLE `updates` (
`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=MyISAM DEFAULT CHARSET=utf8 COMMENT='List of all applied updates in this database.';
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='List of all applied updates in this database.';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -2009,7 +2009,8 @@ INSERT INTO `updates` VALUES
('2020_05_19_00_auth.sql','ED98E556D7B1F7A62792B47C56AFB5019135D10F','ARCHIVED','2020-05-19 01:44:34',0),
('2020_07_22_00_auth.sql','A5D4EC8FCFAB4F2DCE70EDCAD1ACBFB484FD68D5','ARCHIVED','2020-07-22 17:04:47',0),
('2020_09_22_00_auth.sql','A2E29491B54821BCECAA72061AF4D798EC3253B6','ARCHIVED','2020-09-22 00:55:27',0),
('2021_07_06_00_auth.sql','D3E1354B64589894890430A8AA009178FC79F4CD','ARCHIVED','2021-07-06 05:02:44',0);
('2021_07_06_00_auth.sql','D3E1354B64589894890430A8AA009178FC79F4CD','ARCHIVED','2021-07-06 05:02:44',0),
('2021_12_31_00_auth.sql','D5B6B3800A57163901ACFCE1C25463768F5B82D0','RELEASED','2021-12-31 18:36:14',0);
/*!40000 ALTER TABLE `updates` ENABLE KEYS */;
UNLOCK TABLES;
@@ -2019,12 +2020,12 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `updates_include`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!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=MyISAM DEFAULT CHARSET=utf8 COMMENT='List of directories where we want to include sql updates.';
) ENGINE=MyISAM 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 */;
--
@@ -2046,7 +2047,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `uptime`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `uptime` (
`realmid` int(10) unsigned NOT NULL,
`starttime` int(10) unsigned NOT NULL DEFAULT '0',
@@ -2054,7 +2055,7 @@ CREATE TABLE `uptime` (
`maxplayers` smallint(5) unsigned NOT NULL DEFAULT '0',
`revision` varchar(255) NOT NULL DEFAULT 'Trinitycore',
PRIMARY KEY (`realmid`,`starttime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Uptime system';
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Uptime system';
/*!40101 SET character_set_client = @saved_cs_client */;
--