如何使用对代码(脚本),模块和数据库(添加的任务,供应商,项目)的自定义项来正确更新Docker Azerothcore [英] How to properly Update Docker Azerothcore with customizations to both code (scripts), modules and database (added quests, vendors, items)

查看:62
本文介绍了如何使用对代码(脚本),模块和数据库(添加的任务,供应商,项目)的自定义项来正确更新Docker Azerothcore的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Docker容器中运行Azerothcore-WOLTK.我想更新服务器,因为我阅读了一个重要的安全修复程序.

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.

但是,自从我去年(2019年12月)首次安装服务器以来,我从未更新过该服务器.从那时起,我以多种方式自定义服务器:

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. 我自定义了一些老板脚本,可以与两个玩家一起正常使用.
  2. 我已经安装了一些模块,其中一个模块还需要编译一些额外的代码以及运行一些SQL查询.
  3. 我自己修改了数据库,添加了任务,NPC,供应商和物品

因此,我非常担心自己最终会弄乱一切.在保持我执行的所有自定义功能的同时,我将在如何继续将服务器更新到最新版本方面向您寻求帮助.

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.

我特别担心数据库更改,因为我认为我可以备份更新的老板脚本,执行git pull并在构建之前再次替换它们(我之后应该做一个fork,我没有考虑过)...但是无论如何,考虑到我正在使用docker安装,如果您能逐步指导我,我将非常感激.

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.

对于任何与数据库相关的东西,我都使用Heidi SQL,因此我可以将其用于任何数据库过程.我对SQL查询不是很熟练,但是我应该能够根据需要导入.sql文件.

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.

谢谢您的时间:)

推荐答案

我将尝试回答您提到的所有问题:

I'll try to answer all points you mentioned:

可能发生的最糟糕的事情是,您在使用 git 提取最新更改的同时,遇到了合并冲突.因此,您将必须手动解决它们.这不一定很困难,尤其是在您的情况下.这只是老板脚本,因此,从本质上讲,它们是完全独立的,并且在与它们混在一起时,请确保不会破坏其他任何内容.

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.

这些模块应该根本不是问题.模块的存在正是出于这个原因:模块被隔离,并且在更新内核或类似模块的情况下不会引起问题.

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.

在这里,我唯一关心的就是需要进行核心更改的模块.我不知道您安装了哪个模块,通常不应该发生这种情况.正确的AzerothCore模块应该不需要任何核心更改.但是,同样,最糟糕的是一些git merge冲突,我希望没有太大的冲突(取决于模块需要这些更改的大小和侵入性.)

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).

黄金法则是:始终将自定义SQL查询存储在某个地方,以便可以轻松地重新应用它们.例如,始终在 INSERT 之前使用 DELETE ,在可能的情况下更喜欢 UPDATE ,等等...

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...

因此,您只需要一个文件(或一堆文件),其中包含与您进行的自定义更改相对应的所有SQL代码.如果没有它,您仍然可以从数据库中提取它.

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.

然后,如果您认为有必要,可以随时在更新核心后重新应用它们.也有可能根本不需要重新应用它们.或者,也许您想从一个新的AzerothCore世界数据库开始并重新应用您的更改.这确实取决于具体情况,但是无论如何,您都可以(只要将更改保存在SQL文件中即可).

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).

您可以使用 Keira3 编辑数据库,或者只是提取更改以防万一需要.例如,您可以打开一个实体并复制其完整查询".

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".

在开始升级过程之前,请创建以下内容的备份:

Before starting the upgrade procedure, create a backup of:

  • 您的数据库
  • 您已修改的源文件(例如boss等)

但是,自从去年(2019年12月)首次安装服务器以来,我从未更新过服务器.

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

完全不建议这样做!您应该经常(至少每周一次)更新AzerothCore.这样做有很多充分的理由,其中之一是:经常这样做会更容易.

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.

已经在此处提出了有关使用Docker更新AC的一般性问题:如何更新azerothcore-wotlk docker容器

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

这篇关于如何使用对代码(脚本),模块和数据库(添加的任务,供应商,项目)的自定义项来正确更新Docker Azerothcore的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆