Skip to content

Commit 88791ae

Browse files
committed
fix: foreign key constraint "account_vipgroups" and "player_charms"
1 parent b78dff1 commit 88791ae

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

data/migrations/8.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ function onUpdateDatabase()
2525
`rune_void` INT(250) NULL ,
2626
`UsedRunesBit` VARCHAR(250) NULL ,
2727
`UnlockedRunesBit` VARCHAR(250) NULL,
28-
`tracker list` BLOB NULL ) ENGINE = InnoDB DEFAULT CHARSET=utf8;
28+
`tracker_list` BLOB NULL ) ENGINE = InnoDB DEFAULT CHARSET=utf8;
2929
]])
3030
end

schema.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ CREATE TABLE IF NOT EXISTS `account_vipgroups` (
226226
`account_id` int(11) UNSIGNED NOT NULL COMMENT 'id of account whose vip group entry it is',
227227
`name` varchar(128) NOT NULL,
228228
`customizable` BOOLEAN NOT NULL DEFAULT '1',
229-
CONSTRAINT `account_vipgroups_pk` PRIMARY KEY (`id`, `account_id`),
229+
CONSTRAINT `account_vipgroups_pk` PRIMARY KEY (`id`),
230230
CONSTRAINT `account_vipgroups_accounts_fk`
231231
FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`)
232232
ON DELETE CASCADE
@@ -582,7 +582,7 @@ CREATE TABLE IF NOT EXISTS `player_charms` (
582582
`UsedRunesBit` INT NOT NULL DEFAULT '0',
583583
`UnlockedRunesBit` INT NOT NULL DEFAULT '0',
584584
`charms` BLOB NULL,
585-
`tracker list` BLOB NULL,
585+
`tracker_list` BLOB NULL,
586586
CONSTRAINT `player_charms_players_fk`
587587
FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE
588588
) ENGINE = InnoDB DEFAULT CHARSET=utf8;

src/io/functions/iologindata_load_player.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ void IOLoginDataLoad::loadPlayerBestiaryCharms(const std::shared_ptr<Player> &pl
528528
}
529529

530530
unsigned long attrBestSize;
531-
const char* Bestattr = result->getStream("tracker list", attrBestSize);
531+
const char* Bestattr = result->getStream("tracker_list", attrBestSize);
532532
PropStream propBestStream;
533533
propBestStream.init(Bestattr, attrBestSize);
534534

src/io/functions/iologindata_save_player.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ bool IOLoginDataSave::savePlayerBestiarySystem(const std::shared_ptr<Player> &pl
483483
}
484484
size_t trackerSize;
485485
const char* trackerList = propBestiaryStream.getStream(trackerSize);
486-
query << " `tracker list` = " << db.escapeBlob(trackerList, static_cast<uint32_t>(trackerSize));
486+
query << " `tracker_list` = " << db.escapeBlob(trackerList, static_cast<uint32_t>(trackerSize));
487487
query << " WHERE `player_id` = " << player->getGUID();
488488

489489
if (!db.executeQuery(query.str())) {

0 commit comments

Comments
 (0)