Updating Modified Database Structure

Hey all.

I have been working on an old trinitycore compile, creating my custom server. Now I’ve got old databases with all my custom creatures, items, etc, and when trying to move my databases to a fresh (latest update) trinitycore revision, obviously there are errors. This is because my old databases do not contain some of the tables that they should for the new version of TC, and also some of my old tables have different structures to those in the new TC. I am getting a number of ‘column not found’ errors when I start my worldserver.

Is there a way to update the structure of my database without losing any of the data? I also have some custom tables which I don’t want to lose either. Thanks guys, and I wouldn’t be posting here if it wasn’t a last resort. Any and all help is greatly appreciated.

Screenshot of worldserver output error: http://imgur.com/a/4Vrzi

while I believe we don’t support any custom stuff of sorts, a tip would be to compare the base sql against your tables and create them as needed.

Also you should copy the output to pastebin instead of taking a screenshot…

that said, the errors just say that you have missing fields in your characters db tables

Also this looks like a duplicate of your other thread as its all related to your migration from local to hosted…

Hi, thanks for your reply.

I’m looking for a way to update the structure of my old databases. I understand what the error is saying, and it’s saying that because it’s trying to launch the worldserver with outdated databases. I can’t work out how to update the structure of my old databases. Can you point me toward a resource that will teach me how to do this? I don’t mind reading up myself, I just don’t know where to look.

And you’re right in that this is similar to my other thread, but it’s a different question. My old question was to do with the actual migration, and now that I’ve done that, my new question is concerning the updating of database structures.

Thank you.

don’t know if this works, but you can try this

also another way is to create a new database with the new structure using the base sql, then doing an INSERT INTO new_characters SELECT * FROM old_characters;

hope it helps

That’s a very interesting script but unfortunately I’m on using Linux, not windows. I might try to compile a new TC on my windows machine and use the .bat on that one.

And I don’t think your method would work with different database structures. Even if it did, I don’t think it would be very practical to do that for every table. But thanks anyway :slight_smile:

I’ve done it before and besides, you’re running custom stuff… so some amount of manual work will be required

look in worldserver.conf for:

Updates.Redundancy  = 1

Updates.ArchivedRedundancy = 1

That might help you.
I hope it does anyways.
Make sure you backup old work as it could nuke it or make it worse possibly. 

It will only work if your db is new enough to have 
updates_include tables

Hi, I’m facing similar problems. My own installation has databases from Jan 2020(not modified). Any attempt to do automatic migration to the current build of trinity core fails, because data base structures are different. Any options to atomatically migrate databases to current version?