On4fox

SQL Update Script for Exile 0.9.4

26 posts in this topic

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 :D 

Edited by On4fox
  • Like 2

Share this post


Link to post
Share on other sites
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 :D 

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.

  • Like 1

Share this post


Link to post
Share on other sites
Advertisement

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

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 by bregan5

Share this post


Link to post
Share on other sites
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
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

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
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
Advertisement

  • Recently Browsing   0 members

    No registered users viewing this page.