Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-27-2015, 07:22 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default Thought for DB/Server Update Tracking

How difficult would it be for those who add a required .sql update to put an extra insert into a dbupdates table at the end so that it's dead simple for scripts to know what version of the database the server's on?

required/pretend_items_update_2015-07-26.sql
Code:
ALTER TABLE `items` ADD COLUMN `augmentslot19`NOT NULL DEFAULT 0;

INSERT INTO `db_updates` (`id`, `date`, `desc`) VALUES (null, '7/26/2015', 'pretend items update');
Any script wanting to update the database to a newer version could:

Code:
SELECT * FROM `db_updates` WHERE `date`=(SELECT MAX(`date`) FROM `db_updates`);
The script doing the querying would get the most recent date that updates where applied, and which updates were applied on that day, in case there were multiples and not all were applied last time.

In the same vein, perhaps an addition could be made to world.exe in which passing an argument like --version would cause it to return its build date to STDOUT for a script to read. It could then make sure the database has all required (and optional) updates up through that date, instead of using the current date, in case the server's codebase is lagging behind.

Just some random thoughts to complement Akka's handy new auto-patcher to maybe alleviate some of the headache with making sure all required patches are applied.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 09:37 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3