No stuff no Gil when update

Forum rules
NO LONGER BEING MAINTAINED!
Post Reply
User avatar
Virtualchronos
Posts: 53
Joined: Wed Dec 12, 2012 8:45 am

No stuff no Gil when update

Post by Virtualchronos » Mon Jan 21, 2013 1:04 pm

My last update was 2288 and when I update my server, I have no Gils nor weapons and inventory... Everything is empty !

tried at 2295 everything fine (trying to find the responsible update)

anglos
Posts: 29
Joined: Wed Jul 25, 2012 12:38 pm

Re: No stuff no Gil when update

Post by anglos » Mon Jan 21, 2013 1:47 pm

r2297 introduces a change to char_inventory - a new column. You can either add the column in question with a default of 0 and not null or move the data over to the new table with 0 in the new column. I wish the SQL scripts included were a bit smarter with not just overwriting certain tables but I can't complain. Just pay attention to which scripts get updated with new revisions and assume that they delete the table and create a new one.

Edit

From SVN rev. 2297:

CORE add new function for BCNM item and testimony, createWornItem() and hasWornItem()
LUA: update bcnm.lua, now you can use orb and testimony only one time
DB: update char_inventory.sql

Looking at the diff between the latest version and a prior version, this is what was added at the end:

`worn` tinyint(1) NOT NULL DEFAULT '0',

User avatar
Virtualchronos
Posts: 53
Joined: Wed Dec 12, 2012 8:45 am

Re: No stuff no Gil when update

Post by Virtualchronos » Mon Jan 21, 2013 2:18 pm

Thx i contacted ezekiel who helped me to fix it.

I got some question. Should I verify all sql files in each updates to prevent problems like this ? How should I do cause I'm merely a newbie in sql and I don't wanna do stupid things

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: No stuff no Gil when update

Post by kjLotus » Mon Jan 21, 2013 2:44 pm

Virtualchronos wrote:Thx i contacted ezekiel who helped me to fix it.

I got some question. Should I verify all sql files in each updates to prevent problems like this ? How should I do cause I'm merely a newbie in sql and I don't wanna do stupid things
anytime you have to rerun an sql file starting with char_ you should be making sure you aren't overwriting anything

User avatar
Virtualchronos
Posts: 53
Joined: Wed Dec 12, 2012 8:45 am

Re: No stuff no Gil when update

Post by Virtualchronos » Mon Jan 21, 2013 3:40 pm

what do you mean by rerun ?

(I have another problem cant buy anything, 'worn' doesn't have a defaut value) what should I do ?

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: No stuff no Gil when update

Post by kjLotus » Mon Jan 21, 2013 3:58 pm

Virtualchronos wrote:what do you mean by rerun ?

(I have another problem cant buy anything, 'worn' doesn't have a defaut value) what should I do ?
if you update your db manually with navicat or mysql, running the .sql file drops your old table and replaces it with the updated one. rerun is just what i call that action. so in this case, if char_inventory was updated, you did execute batch file in navicat, and it drops the char_inventory table and replaces it with the default (empty) table

if you use a different method for updating the tables then i'm not sure, since that's what i do :p

User avatar
Virtualchronos
Posts: 53
Joined: Wed Dec 12, 2012 8:45 am

Re: No stuff no Gil when update

Post by Virtualchronos » Mon Jan 21, 2013 4:54 pm

Thanks for explanations !
as you said I'm using navicat. So the problem for me is to update my DB without loosing my players stats, so how should I do to fix myself each char data when I see a new problem and how to know wich line to add ?

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: No stuff no Gil when update

Post by kjLotus » Mon Jan 21, 2013 4:59 pm

Virtualchronos wrote:Thanks for explanations !
as you said I'm using navicat. So the problem for me is to update my DB without loosing my players stats, so how should I do to fix myself each char data when I see a new problem and how to know wich line to add ?
depends on what changes. usually it's a new column added, which means you'll have to edit the tables columns and make them match exactly what the updated table is supposed to look like. i think the button is 'table design' (or design table), then you can add/remove columns in there. after that, you may have to add values to the new columns, and that totally depends on what the new column is.

when that happens and if you don't know what values to put in, you can come in irc and ask, someone will probably know

and backup your table before you muck with it, just in case :p

User avatar
Virtualchronos
Posts: 53
Joined: Wed Dec 12, 2012 8:45 am

Re: No stuff no Gil when update

Post by Virtualchronos » Tue Jan 22, 2013 7:06 am

I may be wrong but in few words each time I update my server, if an SQL file is modified, I must run navicat, execute batch/sql file, select the new sql file and launch it except if it's users files like account or char tables. Am I right ?

Isn't it faster and safer to use dsp server updater and let it update my sql files automatically ? Is this tool really safe ?

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: No stuff no Gil when update

Post by kjLotus » Tue Jan 22, 2013 10:56 am

Virtualchronos wrote:I may be wrong but in few words each time I update my server, if an SQL file is modified, I must run navicat, execute batch/sql file, select the new sql file and launch it except if it's users files like account or char tables. Am I right ?
yep
Virtualchronos wrote:Isn't it faster and safer to use dsp server updater and let it update my sql files automatically ? Is this tool really safe ?
don't know, i've never used the dsp updater

char tables aren't modified very often anyways

Post Reply