Hello everyone,
I found that trinitycore has many sql updates coming every other day which requires me to remember which updates I applied before, and to apply all the new ones whihc might be quite a few.
So I created a java application to help me with this task: DBUpdater
You give it your database information and the location of the sql updates.
It will then print a list of updates it found and aks for the first and the last update to apply.
Then it applies them all one by one and exits when it encounters an error.
The source is located at github.
The code is released under the MIT License.
Technical details ( How is it done?)
Basically I am reading the content of the given folder finding all .sql files. I then sort them by the timestamps in their names and ask the user for the first and last updates.
Then, I have a simple class that calls the commandline mysql client available in the PATH to execute each script.
a GUI is planned to be done but god knows if I will ever do one.
I have also been working on using jdbc to execute the queries but there is still an issue with special characters such as ‘$’ that cause jdbc to bark, and the SQLScritpReader class might modify strings in sql queries.
I hope you will find this a useful tool and that it eases your updating processes.
UPDATE: v0.2 is out!
-
I have written a parser that actually works to read the sql udpates query by query
-
The code is using jdbc and the mysql bridge to execute the queries
Download here: DBUpdater.zip