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)

Reply
 
Thread Tools Display Modes
  #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
  #2  
Old 07-27-2015, 07:36 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,595
Default

I think it's a better idea to do it the current way. My reasoning being this, there are people who could somehow apply newer patches without the older ones, which would cause issues, that's why Akkadius' script checks each and every SQL.
Reply With Quote
  #3  
Old 07-27-2015, 07:38 PM
rhyotte
Hill Giant
 
Join Date: Jul 2012
Location: Oklahoma
Posts: 222
Default

Tagging in.
Reply With Quote
  #4  
Old 07-27-2015, 07:54 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

I really don't understand what you're trying to solve that isn't already taken care of.
Reply With Quote
  #5  
Old 07-27-2015, 07:58 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

If you're confused as to how the current system works, consult:

http://wiki.eqemulator.org/p?Automat...Upgrade_System
Reply With Quote
  #6  
Old 07-27-2015, 08:08 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

Oh, wow, yeah, you've got it all taken care of, Akka. Had no idea you were tracking so much in a manifest and common/version.h.

Ignore this thread. Akka's got things -very- well in hand!
Reply With Quote
  #7  
Old 07-27-2015, 08:39 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Lol!

Yeah everything before it was a mess, 10+ threads a week on support issues related to missing database updates.

I think it's a pretty solid system IMO and has made things quite smooth for both users and developers
Reply With Quote
  #8  
Old 07-27-2015, 10:48 PM
N0ctrnl's Avatar
N0ctrnl
Discordant
 
Join Date: Jan 2007
Posts: 443
Default

With a little manual work, it's easy to bring up just about any database to the current schema too. The update tool is a work of art.
Reply With Quote
  #9  
Old 07-27-2015, 11:06 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Quote:
Originally Posted by N0ctrnl View Post
With a little manual work, it's easy to bring up just about any database to the current schema too. The update tool is a work of art.
Thank you N0ctrnl, I spent quite a bit of time on it.

The only thing that could be done with it is actually backport the db manifest through all of the SVN updates. That's the only thing that I've not taken the time to do, which currently it would only keep someone from smoothly updating a 4+ year old database.
Reply With Quote
  #10  
Old 07-28-2015, 12:03 AM
N0ctrnl's Avatar
N0ctrnl
Discordant
 
Join Date: Jan 2007
Posts: 443
Default

I've tried that very thing a few times before running out of steam on it. I find it really interesting to compare older versions and see what kind of gems can be found in some of the classic zones.
Reply With Quote
  #11  
Old 07-28-2015, 12:22 AM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Quote:
Originally Posted by N0ctrnl View Post
I've tried that very thing a few times before running out of steam on it. I find it really interesting to compare older versions and see what kind of gems can be found in some of the classic zones.
Yeah I'll have to get it knocked out sometime
Reply With Quote
Reply


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 10:46 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