Page 2 of 2

Re: Currency, Supply runs, not saving

Posted: Thu Mar 27, 2014 12:34 pm
by kjLotus
if you do a mysqldump on it itll come out in the same format as the .sql file and you can compare the column names/types in there

mysqldump --extended-insert=FALSE -u <username> -p<password> dspdb char_points > char_points_old.sql on cmd

Re: Currency, Supply runs, not saving

Posted: Thu Mar 27, 2014 1:34 pm
by Keldegar
So i'd have to do this for every table? or just look at what's changed in the last 2 months.

Re: Currency, Supply runs, not saving

Posted: Thu Mar 27, 2014 1:39 pm
by nasomi
Do a git pull and it will merge.

Then create a batch file and put this in it:

Code: Select all

cd c:\program files (x86)\msbuild\12.0\bin
msbuild "c:\darkstar\win32\dsgame-server\dsgame-server.sln" /t:clean
msbuild "c:\darkstar\win32\dsgame-server\dsgame-server.sln" /t:build
msbuild "c:\darkstar\win32\dssearch-server\dssearch-server.sln" /t:clean
msbuild "c:\darkstar\win32\dssearch-server\dssearch-server.sln" /t:build
msbuild "c:\darkstar\win32\dsconnect-server\dsconnect-server.sln" /t:clean
msbuild "c:\darkstar\win32\dsconnect-server\dsconnect-server.sln" /t:build
cd c:\darkstar\sql
del auction_house.sql
del chars.sql
del accounts.sql
del accounts_banned.sql
del char_effects.sql
del char_equip.sql
del char_exp.sql
del char_inventory.sql
del char_jobs.sql
del char_look.sql
del char_pet.sql
del char_pet_name.sql
del char_points.sql
del char_profile.sql
del char_skills.sql
del char_stats.sql
del char_storage.sql
del char_vars.sql
del char_weapon_skill_points.sql
del chars.sql
del conquest_system.sql
del delivery_box.sql
del linkshells.sql
FOR %%X IN (*.sql) DO ECHO Importing %%X & "c:\program files\mysql\mysql server 5.6\bin\mysql" dspdb -h localhost -u root -ppass < %%X

That will build and update and import everything for you. You may have to alter some paths depending on your versions.

The above batch file will preserve character information of pre-existing characters. You'll need to alter char_points table manually to put in the new currencies, but everything else should be fine.

After you run that script, pull char_points.sql and find out what columns you're missing, and put them in.

Create a text document and change it to .sql, then in it put code like this:

Code: Select all

alter TABLE `char_points` add `traverser_stones` int(10) unsigned NOT NULL DEFAULT '0',
in that format, a line for each currency you're missing with the correct data type.

Re: Currency, Supply runs, not saving

Posted: Thu Mar 27, 2014 1:55 pm
by kjLotus
Keldegar wrote:So i'd have to do this for every table? or just look at what's changed in the last 2 months.
just the character tables that have changed since last time you updated