Quote:
Originally Posted by cavedude
Let me give the code a try, and work out a query to migrate the current AAs to the new system.
|
This is the final migration query, which worked for me when I tested it out a while ago:
Quote:
Originally Posted by AndMetal
Code:
SET @row = 0;
UPDATE altadv_vars a SET prereq_skill = COALESCE((SELECT p.skill_id FROM (SELECT a2.skill_id, @row := @row + 1 AS prereq_index_num FROM altadv_vars a2) AS p WHERE p.prereq_index_num = a.prereq_skill), 0) WHERE prereq_skill < 1000000;
|
To clarify, it worked great for me when I worked on it a few months ago, but because of the need to make 1 migration going forward (and everything could get VERY confusing if you run it multiple times), I didn't want to force everyone into it right away.
I think the only thing I didn't do was combine the classes & berserker columns in the db, then separate them in the code (easy enough to do).