Files
TrinityCore/sql/updates/6710_realmd_account_access.sql
p0wer 7590479186 * Add support for different gmlevel's for different realms.
*
* Using the value -1 will add the same value for all realms.
* Make sure to apply the updates.
* Information regarding this patch will be posted on the database forums soon.
*
* Thanks to Sundark and the Ilixiuemu team(for original patch)

--HG--
branch : trunk
2009-12-21 21:08:29 -06:00

15 lines
580 B
SQL

-- Table structure for `account_access`
DROP TABLE IF EXISTS `account_access`;
CREATE TABLE `account_access` (
`id` bigint(20) unsigned NOT NULL,
`gmlevel` tinyint(3) unsigned NOT NULL,
`RealmID` int(11) NOT NULL,
PRIMARY KEY (`id`,`RealmID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
-- export current gm account to the new table
-- RealmID -1 = all realms
INSERT INTO `account_access` (id, gmlevel, RealmID)
SELECT `id`, `gmlevel`, -1 FROM `account` WHERE `gmlevel` > 0;
-- Remove the gmlevel field from account
ALTER TABLE account DROP COLUMN `gmlevel`;