Jump to content

Move database updates into MaNGOS.


Guest LilleCarl_

Recommended Posts

Hello! I was just thinking about it, and the current SQL update system we have right now is flawless, except that it it bothering to install new SQL updates as they roll out.

So i was thinking, why can't those be integrated into mangos sourcecode and executed just as they are now, but on mangos startup instead?.

I think i could make a "bad but working" solution on this.

This could evolve into WIP if someone is interested!

- Carl

Link to comment
Share on other sites

This should not be hard. I will not write the script for you, though :P

Here are the ingredients you need:

SHOW COLUMNS FROM db_version LIKE 'required%';

This code gives you one row like

+-----------------------------------------------+--------+------+-----+---------+-------+
| Field                                         | Type   | Null | Key | Default | Extra |
+-----------------------------------------------+--------+------+-----+---------+-------+
| required_s1718_12113_01_mangos_spell_template | bit(1) | YES  |     | NULL    |       |
+-----------------------------------------------+--------+------+-----+---------+-------+

The "Field" column is the last update applied (without the "required_".

Now, create a list of *.sql in the update directory, sort it, and then run through the list comparing against your SQL result. Once found, apply all following updates.

Actually UDB405 has a script that does just that...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use