From 12f703678e709381bb81dfbac18d2788b79d9d21 Mon Sep 17 00:00:00 2001 From: nytmyr <53322305+nytmyr@users.noreply.github.com> Date: Thu, 28 Nov 2024 22:15:34 -0600 Subject: [PATCH] add invalid spell id cleanup to bot spell list inserts --- common/database/database_update_manifest_bots.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/common/database/database_update_manifest_bots.cpp b/common/database/database_update_manifest_bots.cpp index 72e26142c..235c160b3 100644 --- a/common/database/database_update_manifest_bots.cpp +++ b/common/database/database_update_manifest_bots.cpp @@ -1065,6 +1065,13 @@ VALUES (3011, 25555, 112, 86, 90), (3011, 28632, 112, 91, 95), (3011, 34662, 112, 96, 254); + +DELETE +FROM bot_spells_entries +WHERE NOT EXISTS +(SELECT * +FROM spells_new +WHERE bot_spells_entries.spell_id = spells_new.id); )" }, ManifestEntry{ @@ -1163,6 +1170,13 @@ VALUES (3005, 34752, 55, 99, 254), (3005, 34753, 55, 99, 254), (3005, 34751, 55, 99, 254); + +DELETE +FROM bot_spells_entries +WHERE NOT EXISTS +(SELECT * +FROM spells_new +WHERE bot_spells_entries.spell_id = spells_new.id); )" } // -- template; copy/paste this when you need to create a new entry