aboutsummaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2014-06-08 14:54:37 +0200
committerShauren <shauren.trinity@gmail.com>2014-06-08 14:54:37 +0200
commit05c0524bf3d97ba29496fa13e93acd3b8d7d37a4 (patch)
treec7781f1cedac93cd2f7dba51bd716dcd759699fa /sql
parent372f043a68788f1903232392546c0d386b9fc248 (diff)
Core/Battle.net: Refactored handling multiple game accounts
Diffstat (limited to 'sql')
-rw-r--r--sql/base/auth_database.sql2
-rw-r--r--sql/updates/auth/2014_06_08_00_auth_account_434.sql3
2 files changed, 5 insertions, 0 deletions
diff --git a/sql/base/auth_database.sql b/sql/base/auth_database.sql
index 7ab0c855f45..6dca9aa1e14 100644
--- a/sql/base/auth_database.sql
+++ b/sql/base/auth_database.sql
@@ -47,8 +47,10 @@ CREATE TABLE `account` (
`os` varchar(3) NOT NULL DEFAULT '',
`recruiter` int(10) unsigned NOT NULL DEFAULT '0',
`battlenet_account` int(10) unsigned DEFAULT NULL,
+ `battlenet_index` tinyint(3) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
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`) 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_06_08_00_auth_account_434.sql b/sql/updates/auth/2014_06_08_00_auth_account_434.sql
new file mode 100644
index 00000000000..bc57136dc07
--- /dev/null
+++ b/sql/updates/auth/2014_06_08_00_auth_account_434.sql
@@ -0,0 +1,3 @@
+ALTER TABLE `account`
+ ADD `battlenet_index` tinyint(3) unsigned DEFAULT NULL AFTER `battlenet_account`,
+ ADD UNIQUE KEY `uk_bnet_acc` (`battlenet_account`, `battlenet_index`);