thepoetwarrior
08-14-2011, 09:25 AM
I updated my database for the first time in a long time, and char select screen showed my characters naked, and I couldn't log in.
Checking the logs and found out fields are missing in the items table.
I searched for sql's to be sourced in with the missing fields, but they were never included with the udpated source code.
Here is the query I did to fix it.
ALTER TABLE `items` ADD COLUMN `powersourcecapacity` smallint(6) NOT NULL DEFAULT '0' AFTER `expendablearrow`;
ALTER TABLE `items` ADD COLUMN `bardeffect` smallint(6) NOT NULL DEFAULT '0' AFTER `powersourcecapacity`;
ALTER TABLE `items` ADD COLUMN `bardeffecttype` smallint(6) NOT NULL DEFAULT '0' AFTER `bardeffect`;
ALTER TABLE `items` ADD COLUMN `bardlevel2` smallint(6) NOT NULL DEFAULT '0' AFTER `bardeffecttype`;
ALTER TABLE `items` ADD COLUMN `bardlevel` smallint(6) NOT NULL DEFAULT '0' AFTER `bardlevel2`;
ALTER TABLE `items` ADD COLUMN `bardunk1` smallint(6) NOT NULL DEFAULT '0' AFTER `bardlevel`;
ALTER TABLE `items` ADD COLUMN `bardunk2` smallint(6) NOT NULL DEFAULT '0' AFTER `bardunk1`;
ALTER TABLE `items` ADD COLUMN `bardunk3` smallint(6) NOT NULL DEFAULT '0' AFTER `bardunk2`;
ALTER TABLE `items` ADD COLUMN `bardunk4` smallint(6) NOT NULL DEFAULT '0' AFTER `bardunk3`;
ALTER TABLE `items` ADD COLUMN `bardunk5` smallint(6) NOT NULL DEFAULT '0' AFTER `bardunk4`;
ALTER TABLE `items` ADD COLUMN `bardname` varchar(64) NOT NULL DEFAULT '' AFTER `bardunk5`;
ALTER TABLE `items` ADD COLUMN `bardunk7` smallint(6) NOT NULL DEFAULT '0' AFTER `bardname`;
ALTER TABLE `items` ADD COLUMN `UNK214` smallint(6) NOT NULL DEFAULT '0' AFTER `bardunk7`;
Where did I miss the sql update when updating the source code? I sourced in all sql files including the optional ones.
Checking the logs and found out fields are missing in the items table.
I searched for sql's to be sourced in with the missing fields, but they were never included with the udpated source code.
Here is the query I did to fix it.
ALTER TABLE `items` ADD COLUMN `powersourcecapacity` smallint(6) NOT NULL DEFAULT '0' AFTER `expendablearrow`;
ALTER TABLE `items` ADD COLUMN `bardeffect` smallint(6) NOT NULL DEFAULT '0' AFTER `powersourcecapacity`;
ALTER TABLE `items` ADD COLUMN `bardeffecttype` smallint(6) NOT NULL DEFAULT '0' AFTER `bardeffect`;
ALTER TABLE `items` ADD COLUMN `bardlevel2` smallint(6) NOT NULL DEFAULT '0' AFTER `bardeffecttype`;
ALTER TABLE `items` ADD COLUMN `bardlevel` smallint(6) NOT NULL DEFAULT '0' AFTER `bardlevel2`;
ALTER TABLE `items` ADD COLUMN `bardunk1` smallint(6) NOT NULL DEFAULT '0' AFTER `bardlevel`;
ALTER TABLE `items` ADD COLUMN `bardunk2` smallint(6) NOT NULL DEFAULT '0' AFTER `bardunk1`;
ALTER TABLE `items` ADD COLUMN `bardunk3` smallint(6) NOT NULL DEFAULT '0' AFTER `bardunk2`;
ALTER TABLE `items` ADD COLUMN `bardunk4` smallint(6) NOT NULL DEFAULT '0' AFTER `bardunk3`;
ALTER TABLE `items` ADD COLUMN `bardunk5` smallint(6) NOT NULL DEFAULT '0' AFTER `bardunk4`;
ALTER TABLE `items` ADD COLUMN `bardname` varchar(64) NOT NULL DEFAULT '' AFTER `bardunk5`;
ALTER TABLE `items` ADD COLUMN `bardunk7` smallint(6) NOT NULL DEFAULT '0' AFTER `bardname`;
ALTER TABLE `items` ADD COLUMN `UNK214` smallint(6) NOT NULL DEFAULT '0' AFTER `bardunk7`;
Where did I miss the sql update when updating the source code? I sourced in all sql files including the optional ones.