Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
AC revision: https://github.com/azerothcore/azerothcore-wotlk/commit/008f16fac2fb159e0259da7959fe64f5584bc7de
TC revision: https://github.com/TrinityCore/TrinityCore/commit/3dbe80ee2e0d1848302bcf34b654693462942639
Date: 29-12-2018
diff --git a/acore_auth.sql b/tc_auth.sql
--- a/acore_auth.sql
+++ b/tc_auth.sql
--- Dumping structure for table acore_auth.account
+-- Dumping structure for table tc_auth.account
DROP TABLE IF EXISTS `account`;
CREATE TABLE IF NOT EXISTS `account` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Identifier',
@@ -21,7 +21,7 @@ CREATE TABLE IF NOT EXISTS `account` (
`v` varchar(64) NOT NULL DEFAULT '',
`s` varchar(64) NOT NULL DEFAULT '',
`token_key` varchar(100) NOT NULL DEFAULT '',
- `email` varchar(254) 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',
@@ -29,7 +29,7 @@ CREATE TABLE IF NOT EXISTS `account` (
`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 NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `last_login` timestamp NULL DEFAULT NULL,
`online` tinyint(3) unsigned NOT NULL DEFAULT '0',
`expansion` tinyint(3) unsigned NOT NULL DEFAULT '2',
`mutetime` bigint(20) NOT NULL DEFAULT '0',
@@ -38,13 +38,12 @@ CREATE TABLE IF NOT EXISTS `account` (
`locale` tinyint(3) unsigned NOT NULL DEFAULT '0',
`os` varchar(3) NOT NULL DEFAULT '',
`recruiter` int(10) unsigned NOT NULL DEFAULT '0',
- `totaltime` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `idx_username` (`username`)
-) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COMMENT='Account System';
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Account System';
--- Dumping structure for table acore_auth.account_muted
+-- Dumping structure for table tc_auth.account_muted
DROP TABLE IF EXISTS `account_muted`;
CREATE TABLE IF NOT EXISTS `account_muted` (
`guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier',
@@ -76,10 +75,10 @@ CREATE TABLE IF NOT EXISTS `account_muted` (
`mutedby` varchar(50) NOT NULL,
`mutereason` varchar(255) NOT NULL,
PRIMARY KEY (`guid`,`mutedate`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='mute List';
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='mute List';
--- Dumping structure for table acore_auth.ip2nation
-DROP TABLE IF EXISTS `ip2nation`;
-CREATE TABLE IF NOT EXISTS `ip2nation` (
- `ip` int(11) unsigned NOT NULL DEFAULT '0',
- `country` char(2) NOT NULL DEFAULT '',
- KEY `ip` (`ip`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-
--- Dumping structure for table acore_auth.ip2nationCountries
-DROP TABLE IF EXISTS `ip2nationCountries`;
-CREATE TABLE IF NOT EXISTS `ip2nationCountries` (
- `code` varchar(4) NOT NULL DEFAULT '',
- `iso_code_2` varchar(2) NOT NULL DEFAULT '',
- `iso_code_3` varchar(3) DEFAULT '',
- `iso_country` varchar(255) NOT NULL DEFAULT '',
- `country` varchar(255) NOT NULL DEFAULT '',
- `lat` float NOT NULL DEFAULT '0',
- `lon` float NOT NULL DEFAULT '0',
- PRIMARY KEY (`code`),
- KEY `code` (`code`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--- Dumping structure for table acore_auth.realmcharacters
+-- Dumping structure for table tc_auth.logs_ip_actions
+DROP TABLE IF EXISTS `logs_ip_actions`;
+CREATE TABLE IF NOT EXISTS `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 COMMENT 'Notes inserted by system',
+ `unixtime` int(10) unsigned NOT NULL COMMENT 'Unixtime',
+ `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';
+
+
+-- Dumping structure for table tc_auth.rbac_account_permissions
+DROP TABLE IF EXISTS `rbac_account_permissions`;
+CREATE TABLE IF NOT EXISTS `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=utf8 COMMENT='Account-Permission relation';
+
+
+-- Dumping structure for table tc_auth.rbac_default_permissions
+DROP TABLE IF EXISTS `rbac_default_permissions`;
+CREATE TABLE IF NOT EXISTS `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=utf8 COMMENT='Default permission to assign to different account security levels';
+
+
+-- Dumping structure for table tc_auth.rbac_linked_permissions
+DROP TABLE IF EXISTS `rbac_linked_permissions`;
+CREATE TABLE IF NOT EXISTS `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=utf8 COMMENT='Permission - Linked Permission relation';
+
+
+-- Dumping structure for table tc_auth.rbac_permissions
+DROP TABLE IF EXISTS `rbac_permissions`;
+CREATE TABLE IF NOT EXISTS `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';
+
+
+-- Dumping structure for table tc_auth.realmcharacters
DROP TABLE IF EXISTS `realmcharacters`;
CREATE TABLE IF NOT EXISTS `realmcharacters` (
`realmid` int(10) unsigned NOT NULL DEFAULT '0',
@@ -148,7 +187,7 @@ CREATE TABLE IF NOT EXISTS `realmcharacters` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Realm Character Tracker';
--- Dumping structure for table acore_auth.uptime
+-- Dumping structure for table tc_auth.updates
+DROP TABLE IF EXISTS `updates`;
+CREATE TABLE IF NOT EXISTS `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=MyISAM DEFAULT CHARSET=utf8 COMMENT='List of all applied updates in this database.';
+
+
+-- Dumping structure for table tc_auth.updates_include
+DROP TABLE IF EXISTS `updates_include`;
+CREATE TABLE IF NOT EXISTS `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.';
+
+
+-- Dumping structure for table tc_auth.uptime
DROP TABLE IF EXISTS `uptime`;
CREATE TABLE IF NOT EXISTS `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 'AzerothCore',
+ `revision` varchar(255) NOT NULL DEFAULT 'Trinitycore',
PRIMARY KEY (`realmid`,`starttime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Uptime system';
-
--- Dumping structure for table acore_auth.version_db_auth
-DROP TABLE IF EXISTS `version_db_auth`;
-CREATE TABLE IF NOT EXISTS `version_db_auth` (
- `sql_rev` varchar(100) NOT NULL,
- `required_rev` varchar(100) DEFAULT NULL,
- `2018_09_17_00` bit(1) DEFAULT NULL,
- PRIMARY KEY (`sql_rev`),
- KEY `required` (`required_rev`),
- CONSTRAINT `required` FOREIGN KEY (`required_rev`) REFERENCES `version_db_auth` (`sql_rev`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Last applied sql update to DB';
-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.