AzerothCore:Git Pull后SQL更新导入方式的技术咨询
Answer to Your Git Pull & Database Update Question
Great question! Let me break this down clearly, since this is a common workflow in WoW emulation projects (like TrinityCore or AzerothCore, which typically use tools like worldserver.exe and db_assembler):
Core Behavior: Automatic Updates via worldserver.exe
In most mainstream emulator projects, you don't need to run any extra scripts to apply SQL updates after a git pull. When you start worldserver.exe, it automatically:
- Scans the configured SQL update directories (usually something like
sql/updates/world/orsql/updates/auth/) for new scripts. - Checks the database's update tracking table (often called
updatesorapplied_updates) to see which scripts haven't been run yet. - Executes all unapplied SQL scripts automatically, no manual intervention required.
When Would You Use app/db_assembler?
The db_assembler bash script is a utility for specific scenarios, not a mandatory step for regular updates:
- Preprocessing or merging updates: If you have scattered, small SQL files and want to combine them into a single, clean script (for backup, manual review, or easier execution).
- Project-specific requirements: Some custom forks or older versions might require this script to format updates correctly (e.g., replacing placeholders, sorting scripts by version) before
worldserver.execan recognize them. Always check your project's documentation if this is the case. - Manual update control: If you're working in a production environment and want to preview exactly what SQL will run before applying it, you can use
db_assemblerto assemble the scripts, review them, then either run them manually or letworldserver.exepick them up.
Quick Summary
- Default workflow: After
git pull, just startworldserver.exe—it will handle SQL updates automatically for you. - Use
db_assembleronly if: Your project docs specify it, you need to merge/preview updates, or you're troubleshooting an auto-update failure.
内容的提问来源于stack exchange,提问作者Jorge Salomon




