Jump to content
TrinityCore
Sign in to follow this  
Athris

Update a very old database with many custom edits

Recommended Posts

Hello!

Currently i use TrinityCore rev. 0c2f5340cc3f+ 2013-12-31 20:08:11 +0100 (master branch) (Win32, Release) (3.3.5a) with the db version TDB 335.52 (i know very old). We spawn and despawn many creatures/objects in the database. We create and remove waypoints and create new items. So we manipulated many GUIDs and entrys.

Now i need the new core version. For this i fetch the new core version and put my custom program code into the new core version. After that the core compiles and everything looks good. Now i must update the database and thats overwhelmed me a little bit. I download all database zips from https://github.com/TrinityCore/TrinityCore/releases (DB 53, DB 54, [...], DB.61) and extract them. Now i try to run successively all sql files.

Between update 52 and 60 i get only errors like "INSERT INTO creature fails because primary key exists". Thats the problem with my manipulate guids, because the delete sql based on the creature id and not the guid. For example:
SET @GUID = 50000;
DELETE FROM creatures WHERE id IN (1234, 5432);
INSERT INTO creatures VALUES (@GUID+0, ......);
INSERT INTO creatures VALUES (@GUID+1, ......);
It does not work, because for example in my database the GUID 50000 has the id 1111.

So i create a new delete before the insert statement:
SET @GUID = 50000;
DELETE FROM creatures WHERE id IN (1234, 5432);
DELETE FROM creatures WHERE guid IN (@GUID+0, @GUID+1);
INSERT INTO creatures VALUES (@GUID+0, ......);
INSERT INTO creatures VALUES (@GUID+1, ......);

 

Now with the db update 60 i get other errors:

1. Quest_template_addon does not exist in my database, but the sql want to update data in this table. Did i miss an update sql which create this table?

2. Page_text has not a column names "ID". In my database the column names "entry". Did i miss an update sql which change the column name?

3. Creature_equipment_template has not a column names "CreatureID". In my database the column names "entry".

 

After that errors i cancel the update. So did i forgot something?

Is there an easier way to update a old custom database to a new database version which is compatible to the new core version?

What would you recommend?

 

Additional information: We dont use trinity core for blizzlike content. If dungeons, raids or quests does not working then it is not so bad.

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...