Paragon: move module SQL to AC's data/sql/db-* layout for auto-update

AzerothCore's DBUpdater scans modules/<mod>/data/sql/db-{world,characters,auth}/
(see src/server/database/Updater/UpdateFetcher.cpp). The previous
modules/mod-paragon/sql/{world,characters}/base/ layout was non-standard
and skipped by the updater, so a fresh deploy never had Paragon tables
created automatically.

Move all five SQL files into the standard layout. Files are idempotent
(CREATE TABLE IF NOT EXISTS plus a DELETE+INSERT for the cost table)
and now apply on every dbimport / worldserver start, recorded by hash
in <db>.updates so re-runs are skipped.

Update BUILD-NATIVE.md to drop the manual mysql import section, and
document the SQL layout in the mod-paragon README.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Docker Build
2026-05-08 22:03:42 -04:00
parent 203356aca8
commit df7e943a74
7 changed files with 22 additions and 14 deletions
@@ -0,0 +1,9 @@
-- AE / TE currency storage (Paragon class progression).
-- Apply to the *character* database (same DB as `characters`, `character_spell`, etc.).
CREATE TABLE IF NOT EXISTS `character_paragon_currency` (
`guid` INT UNSIGNED NOT NULL COMMENT 'characters.guid',
`ability_essence` SMALLINT UNSIGNED NOT NULL DEFAULT '0',
`talent_essence` SMALLINT UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (`guid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='mod-paragon: Ability Essence / Talent Essence';
@@ -0,0 +1,34 @@
-- Spells and talents learned only through Character Advancement (Lock In / .paragon learn).
-- Apply to the character database (same as `characters`, `character_spell`, etc.).
CREATE TABLE IF NOT EXISTS `character_paragon_panel_spells` (
`guid` INT UNSIGNED NOT NULL COMMENT 'characters.guid',
`spell_id` INT UNSIGNED NOT NULL,
PRIMARY KEY (`guid`, `spell_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
COMMENT='mod-paragon: spells purchased via Character Advancement';
CREATE TABLE IF NOT EXISTS `character_paragon_panel_talents` (
`guid` INT UNSIGNED NOT NULL COMMENT 'characters.guid',
`talent_id` SMALLINT UNSIGNED NOT NULL,
`rank` TINYINT UNSIGNED NOT NULL,
PRIMARY KEY (`guid`, `talent_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
COMMENT='mod-paragon: talent ranks purchased via Character Advancement';
-- Passive "dependent" spells that AzerothCore's `addSpell` machinery
-- (via spell_learn_spell + SPELL_EFFECT_LEARN_SPELL) auto-grants when a
-- panel-purchased spell is learned. We keep them learned (some are
-- required for the parent ability to function -- e.g. Frost Fever for
-- Icy Touch, Blood Plague for Plague Strike) but record them here so
-- Reset Abilities / Reset Everything can unlearn them alongside the
-- parent. Only passive auto-learns are tracked here; active dependents
-- (Death Coil, Death Grip, ...) are revoked at learn time and never
-- reach this table.
CREATE TABLE IF NOT EXISTS `character_paragon_panel_spell_children` (
`guid` INT UNSIGNED NOT NULL COMMENT 'characters.guid',
`parent_spell_id` INT UNSIGNED NOT NULL COMMENT 'character_paragon_panel_spells.spell_id',
`child_spell_id` INT UNSIGNED NOT NULL COMMENT 'auto-learned passive spell id',
PRIMARY KEY (`guid`, `parent_spell_id`, `child_spell_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
COMMENT='mod-paragon: passive auto-learn dependents to unlearn on reset';