diff --git a/sql/base/auth_database.sql b/sql/base/auth_database.sql index 2d217dabe91..7ab0c855f45 100644 --- a/sql/base/auth_database.sql +++ b/sql/base/auth_database.sql @@ -46,8 +46,10 @@ CREATE TABLE `account` ( `locale` tinyint(3) unsigned NOT NULL DEFAULT '0', `os` varchar(3) NOT NULL DEFAULT '', `recruiter` int(10) unsigned NOT NULL DEFAULT '0', + `battlenet_account` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`id`), - UNIQUE KEY `idx_username` (`username`) + UNIQUE KEY `idx_username` (`username`), + CONSTRAINT `fk_bnet_acc` FOREIGN KEY (`battlenet_account`) REFERENCES `battlenet_accounts` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Account System'; /*!40101 SET character_set_client = @saved_cs_client */; diff --git a/sql/updates/auth/2014_xx_xx_00_auth_battlenet.sql b/sql/updates/auth/2014_05_06_00_auth_battlenet_434.sql similarity index 97% rename from sql/updates/auth/2014_xx_xx_00_auth_battlenet.sql rename to sql/updates/auth/2014_05_06_00_auth_battlenet_434.sql index 141c21dde54..f4410c58976 100644 --- a/sql/updates/auth/2014_xx_xx_00_auth_battlenet.sql +++ b/sql/updates/auth/2014_05_06_00_auth_battlenet_434.sql @@ -1,3 +1,7 @@ +ALTER TABLE `account` + ADD `battlenet_account` int(10) unsigned DEFAULT NULL AFTER `recruiter`, + ADD CONSTRAINT `fk_bnet_acc` FOREIGN KEY (`battlenet_account`) REFERENCES `battlenet_accounts` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT; + ALTER TABLE `realmlist` ADD `Region` tinyint(3) UNSIGNED NOT NULL DEFAULT 2 AFTER `gamebuild`, ADD `Battlegroup` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 AFTER `Region`; diff --git a/sql/updates/auth/2014_xx_xx_01_auth_battlenet.sql b/sql/updates/auth/2014_06_01_00_auth_battlenet_434.sql similarity index 100% rename from sql/updates/auth/2014_xx_xx_01_auth_battlenet.sql rename to sql/updates/auth/2014_06_01_00_auth_battlenet_434.sql