DB/Structure

* fix data types and data length and add default values where necessary
 * data should no longer get truncated
 * misc fixes
This commit is contained in:
Sarjuuk
2024-05-22 17:53:31 +02:00
parent 7d5930865c
commit f6565ea924
15 changed files with 1980 additions and 2003 deletions

View File

@@ -687,7 +687,7 @@ class RemoteProfileList extends ProfileList
if ($guildData)
{
foreach (Util::createSqlBatchInsert($guildData) as $ins)
DB::Aowow()->query('INSERT IGNORE INTO ?_profiler_guild (?#) VALUES '.$ins, array_keys(reset($guildData)));
DB::Aowow()->query('INSERT INTO ?_profiler_guild (?#) VALUES '.$ins.' ON DUPLICATE KEY UPDATE `id` = `id`', array_keys(reset($guildData)));
// merge back local ids
$localGuilds = DB::Aowow()->selectCol('SELECT realm AS ARRAY_KEY, realmGUID AS ARRAY_KEY2, id FROM ?_profiler_guild WHERE realm IN (?a) AND realmGUID IN (?a)',