On4fox 69 Report post Posted December 8, 2015 (edited) Heyho, here is my sql update script. Please give feedback and comments on what could be not working or should be changed. You can also just make PR to the repo Since i don't got any access to the new server files i could not test it yet. NO WARRANTY THAT THIS WILL NOT CAUSE ANY PROBLEMS. IF YOU F**K UP YOUR DB I CAN'T SUPPORT YOU.You need MySQL 5.6+ !! https://github.com/Onefox/exile_update_935_94/blob/master/update_schema.sql Cheers, PS.: Still don't know if this is the right place Edited December 10, 2015 by On4fox 2 Share this post Link to post Share on other sites
bregan5 36 Report post Posted December 8, 2015 2 hours ago, On4fox said: Heyho, here is my sql update script. Please give feedback and comments on what could be not working or should be changed. You can also just make PR to the repo Since i don't got any access to the new server files i could not test it yet. NO WARRANTY THAT THIS WILL NOT CAUSE ANY PROBLEMS. IF YOU F**K UP YOUR DB I CAN'T SUPPORT YOU. https://github.com/Onefox/exile_update_935_94/blob/master/update_schema.sql Cheers, PS.: Still don't know if this is the right place Was going to get started on this...but since you did it already I will go ahead and make a copy of my database and see what the result is. I'll let you know whats up. 1 Share this post Link to post Share on other sites
On4fox 69 Report post Posted December 8, 2015 Perfect, the best code is viewed and tested by many devs! I used mysqldiff to make the comparison. Than i build ontop of that and removed useless statements The territory connection in the end is base on the default values of a max base... and the minimum distance between territories. So for custom values in there you have to be careful. Share this post Link to post Share on other sites
bregan5 36 Report post Posted December 8, 2015 (edited) Backed my database up, created a new one, ran sql from backup successfully, ran your posted update.sql and got this edit accidentally added something. still testing Edited December 8, 2015 by bregan5 Share this post Link to post Share on other sites
bregan5 36 Report post Posted December 8, 2015 1 hour ago, On4fox said: Perfect, the best code is viewed and tested by many devs! I used mysqldiff to make the comparison. Than i build ontop of that and removed useless statements The territory connection in the end is base on the default values of a max base... and the minimum distance between territories. So for custom values in there you have to be careful. After I realized I had added a new item to the table...executed fine. No errors. Good job. Share this post Link to post Share on other sites
bregan5 36 Report post Posted December 8, 2015 1 hour ago, On4fox said: Perfect, the best code is viewed and tested by many devs! I used mysqldiff to make the comparison. Than i build ontop of that and removed useless statements The territory connection in the end is base on the default values of a max base... and the minimum distance between territories. So for custom values in there you have to be careful. UPDATE `construction` c INNER JOIN `territory` t ON ABS( t.position_x - c.position_x ) < t.radius AND ABS( t.position_y - c.position_y ) < t.radius SET c.territory_id = t.id; UPDATE `container` c INNER JOIN `territory` t ON ABS( t.position_x - c.position_x ) < t.radius AND ABS( t.position_y - c.position_y ) < t.radius SET c.territory_id = t.id; Are you talking about this? Share this post Link to post Share on other sites
Bizw0z X-) 7 Report post Posted December 8, 2015 i noticed in the pre release server rc that the db has a new table for 'player history'. Was you just leaving it out? looks like its just going to contain when and where they died. im guessing that is just going to take it from player on their death and shove it in there, speeding up the player table search on server login. CREATE TABLE `player_history` ( `id` int(11) UNSIGNED NOT NULL, `account_uid` varchar(32) NOT NULL, `name` varchar(64) NOT NULL, `died_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `position_x` double NOT NULL, `position_y` double NOT NULL, `position_z` double NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; Share this post Link to post Share on other sites
Spartan 85 Report post Posted December 9, 2015 It's probably for the corpse marker on the map feature that was in the changelog. Share this post Link to post Share on other sites
On4fox 69 Report post Posted December 9, 2015 8 hours ago, Bizw0z X-) said: i noticed in the pre release server rc that the db has a new table for 'player history'. Thanks, i've added it. Share this post Link to post Share on other sites
BetterDeadThanZed 1006 Report post Posted December 9, 2015 Is this any different from this? http://exile.majormittens.co.uk/topic/8280-sql-update-script-for-094/ Share this post Link to post Share on other sites