How to properly Update Docker Azerothcore with customizations to both code (scripts), modules and database (added quests, vendors, items)

吃可爱长大的小学妹 提交于 2021-01-28 05:54:36

问题


I'm running Azerothcore-WOLTK inside a Docker container. I would like to update the server since I read there's an important security fix.

However I never updated the server since I first installed it last year (December 2019). Since then, I have customized the server in several ways:

  1. I have customized a few boss scripts to work properly with two players.
  2. I have installed a few modules, including one that also required some extra code to be compiled, and some SQL queries to be run.
  3. I have modified the database myself, adding Quests, NPC, Vendors and Items

As such, I'm extremely concerned I would end up messing everything up. I would require your assistance on how to proceed to update the server to the latest version while maintaining all the customization I have performed.

I'm especially concerned about the database changes as I figure I could backup the updated boss scripts, do a git pull and replace them again before building (I should do a fork afterwards, I didn't think about it)... But in any I case I would be extremely thankful if you could guide me step by step along the way, considering I am using a docker installation.

For anything Database related I use Heidi SQL, so I could use that for any Database procedure. I'm not very proficient in SQL queries, but I should be able to import .sql files as needed.

I realize I'm asking a lot, so please don't feel pressured to answer right away. I will be most thankful if you could help me whenever you have the chance.

Thank you for your time :)


回答1:


I'll try to answer all points you mentioned:

1. The boss scripts.

The worst thing that can happen is that you get merge conflicts while pulling the latest changes using git. So you would have to manually solve them. It's not necessarily difficult, especially in your case. It's just boss scripts, so by nature, they are quite self-contained and you are sure to not break anything else when messing with them.

2. Modules

The modules should not be a problem at all. Modules exist exactly for this reason: being isolated and not causing issues in case of updating the core or similar.

My only concern here would be that module that required a core change. I don't know what module you installed, normally this shouldn't happen. A proper AzerothCore module should not require any core change. However, again, the worst thing you can have is some git merge conflicts, nothing too big I hope (depends on how big and invasive were these changes required by the module).

3. Custom database changes.

The golden rule is: always store your custom SQL queries somewhere, in a way that they can be easily re-applied. For example, always use DELETE before INSERT, prefer UPDATE when possible, etc...

So all you need to have is a file (or a bunch of files) containing all your SQL code corresponding to the custom changes you made. If you don't have it, you can still extract it from your DB.

Then you can always re-apply them after you update your core, if you feel it's needed. It might also be the case that you don't need to re-apply them at all. Or maybe you want to start from a fresh AzerothCore world database and re-apply your changes. This really depends on the specific case, but anyway you will be fine (as long as you keep your changes in SQL files).

You can use Keira3 to edit your database, or just extract your changes in case you need to. For example, you can open an entity and copy its "full query".

Backup first

Before starting the upgrade procedure, create a backup of:

  • your DB
  • the source files that you have modified (e.g. bosses, etc...)

Update frequently!

However I never updated the server since I first installed it last year (December 2019).

This is not recommended at all! You are supposed to update your AzerothCore frequently (at least once a week). There are a lot of good reasons to do so, one of them is: it's way easier if you do it often.

How to update AzerothCore when using Docker

A generic question about updating AC with Docker has been asked already here: How to update azerothcore-wotlk docker container



来源:https://stackoverflow.com/questions/63473553/how-to-properly-update-docker-azerothcore-with-customizations-to-both-code-scri

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!