ALTER TABLE `clan_subpledges` ADD COLUMN `leader_id` INTEGER NOT NULL DEFAULT 0;
UPDATE `clan_subpledges` , `characters` SET clan_subpledges.leader_id = characters.obj_id WHERE clan_subpledges.leader_name = characters.char_name;
ALTER TABLE `clan_subpledges` DROP COLUMN `leader_name`;

ALTER TABLE `characters` CHANGE `obj_Id` `charId` INT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `character_quests` CHANGE `char_id` `charId` INT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `character_recommends` CHANGE `char_id` `charId` INT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `character_recipebook` CHANGE `char_id` `charId` INT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `character_hennas` CHANGE `char_obj_id` `charId` INT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `character_macroses` CHANGE `char_obj_id` `charId` INT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `character_shortcuts` CHANGE `char_obj_id` `charId` INT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `character_subclasses` CHANGE `char_obj_id` `charId` INT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `character_skills` CHANGE `char_obj_id` `charId` INT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `character_skills_save` CHANGE `char_obj_id` `charId` INT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `character_friends`
CHANGE `char_id` `charId` INT UNSIGNED NOT NULL DEFAULT 0, 
CHANGE `friend_id` `friendId` INT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `cursed_weapons` CHANGE `playerId` `charId` INT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `heroes` CHANGE `char_id` `charId` INT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `olympiad_nobles` CHANGE `char_id` `charId` INT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `seven_signs` CHANGE `char_obj_id` `charId` INT UNSIGNED NOT NULL DEFAULT 0;
