Page 1 of 1
No stuff no Gil when update
Posted: Mon Jan 21, 2013 1:04 pm
by Virtualchronos
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)
Re: No stuff no Gil when update
Posted: Mon Jan 21, 2013 1:47 pm
by anglos
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',
Re: No stuff no Gil when update
Posted: Mon Jan 21, 2013 2:18 pm
by Virtualchronos
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
Re: No stuff no Gil when update
Posted: Mon Jan 21, 2013 2:44 pm
by kjLotus
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
Re: No stuff no Gil when update
Posted: Mon Jan 21, 2013 3:40 pm
by Virtualchronos
what do you mean by rerun ?
(I have another problem cant buy anything, 'worn' doesn't have a defaut value) what should I do ?
Re: No stuff no Gil when update
Posted: Mon Jan 21, 2013 3:58 pm
by kjLotus
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
Re: No stuff no Gil when update
Posted: Mon Jan 21, 2013 4:54 pm
by Virtualchronos
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 ?
Re: No stuff no Gil when update
Posted: Mon Jan 21, 2013 4:59 pm
by kjLotus
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
Re: No stuff no Gil when update
Posted: Tue Jan 22, 2013 7:06 am
by Virtualchronos
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 ?
Re: No stuff no Gil when update
Posted: Tue Jan 22, 2013 10:56 am
by kjLotus
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