diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index 11dd1b315..498bf3deb 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -370,6 +370,7 @@ 9114|2017_07_22_aura.sql|SHOW TABLES LIKE 'auras'|empty| 9115|2017_10_28_traps.sql|SHOW COLUMNS FROM `traps` LIKE 'triggered_number'|empty| 9116|2017_12_16_GroundSpawn_Respawn_Timer.sql|SHOW COLUMNS FROM `ground_spawns` WHERE Field = 'respawn_timer' AND Type = 'int(11) unsigned'|empty| +9117|2017_12_25_AccountTable.sql|SHOW COLUMNS FROM `ground_spawns` WHERE Field = 'ls_id' AND Type = 'varchar(64)'|empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/utils/sql/git/optional/2017_12_25_LoginServer.sql b/utils/sql/git/optional/2017_12_25_LoginServer.sql new file mode 100644 index 000000000..3853e5c21 --- /dev/null +++ b/utils/sql/git/optional/2017_12_25_LoginServer.sql @@ -0,0 +1,21 @@ +ALTER TABLE `tblloginserveraccounts` + ADD COLUMN `AccountLoginserver` VARCHAR(64) NULL AFTER `LastIPAddress`; + +ALTER TABLE `tblloginserveraccounts` + CHANGE COLUMN `AccountLoginserver` `AccountLoginserver` VARCHAR(64) NOT NULL DEFAULT 'eqemu' AFTER `LoginServerID`, + DROP PRIMARY KEY, + ADD PRIMARY KEY (`LoginServerID`, `AccountLoginserver`); + +ALTER TABLE `tblloginserveraccounts` + ADD UNIQUE INDEX `AccountLoginserver_AccountName` (`AccountLoginserver`, `AccountName`); + +ALTER TABLE `tblloginserveraccounts` + ALTER `LoginServerID` DROP DEFAULT; +ALTER TABLE `tblloginserveraccounts` + CHANGE COLUMN `LoginServerID` `LoginServerID` INT(10) UNSIGNED NOT NULL FIRST; + +ALTER TABLE `tblloginserveraccounts` + ALTER `AccountPassword` DROP DEFAULT; +ALTER TABLE `tblloginserveraccounts` + CHANGE COLUMN `AccountPassword` `AccountPassword` TEXT NOT NULL AFTER `AccountName`; + \ No newline at end of file diff --git a/utils/sql/git/required/2017_12_25_AccountTable.sql b/utils/sql/git/required/2017_12_25_AccountTable.sql new file mode 100644 index 000000000..e4393d29d --- /dev/null +++ b/utils/sql/git/required/2017_12_25_AccountTable.sql @@ -0,0 +1,11 @@ +ALTER TABLE `account` + DROP INDEX `name`, + DROP INDEX `lsaccount_id`; + +ALTER TABLE `account` + ADD COLUMN `ls_id` VARCHAR(64) NULL DEFAULT 'eqemu' AFTER `status`; + +ALTER TABLE `account` + ADD UNIQUE INDEX `name_ls_id` (`name`, `ls_id`), + ADD UNIQUE INDEX `ls_id_lsaccount_id` (`ls_id`, `lsaccount_id`); + \ No newline at end of file