-- Working as of April 16th, 2013
--
-- Table changes for table `auction`
--
ALTER TABLE `auction` ADD `unique_id` BIGINT( 20 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `card3` ;
--
-- Table changes for table `cart_inventory`
--
ALTER TABLE `cart_inventory` ADD `unique_id` BIGINT( 20 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `expire_time` ;
--
-- Table changes for table `char`
--
ALTER TABLE `char` ADD `slotchange` SMALLINT( 3 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `delete_date` ,
ADD `char_opt` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `slotchange`,
CHANGE `weapon` `weapon` SMALLINT( 6 ) UNSIGNED NOT NULL DEFAULT '0' ,
DROP INDEX `name` ,
ADD UNIQUE `name_key` ( `name` ) ;
--
-- Table changes for table `elemental`
--
ALTER TABLE `elemental` ADD `atk1` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT '0' AFTER `max_sp`,
ADD `atk2` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT '0' AFTER `atk1`,
ADD `matk` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT '0' AFTER `atk2`,
ADD `aspd` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0' AFTER `matk`,
ADD `def` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0' AFTER `aspd`,
ADD `mdef` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0' AFTER `def`,
ADD `flee` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0' AFTER `mdef`,
ADD `hit` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0' AFTER `flee`,
DROP `str`,
DROP `agi`,
DROP `vit`,
DROP `int`,
DROP `dex`,
DROP `luk`;
--
-- Table changes for table `hotkey`
--
ALTER TABLE `hotkey` DROP INDEX `char_id`;
--
-- Table changes for table `global_reg_value`
--
ALTER TABLE `global_reg_value` CHANGE `type` `type` TINYINT( 1 ) NOT NULL DEFAULT '3',
DROP INDEX `char_id` ;
--
-- Table changes for table `guild_position`
--
ALTER TABLE `guild_position` DROP INDEX `guild_id` ;
--
-- Table changes for table `guild_storage`
--
ALTER TABLE `guild_storage` ADD `unique_id` BIGINT( 20 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `expire_time` ;
--
-- Table changes for table `homunculus`
--
ALTER TABLE `homunculus` ADD `prev_class` MEDIUMINT( 9 ) NOT NULL DEFAULT '0' AFTER `class` ;
--
-- Table changes for table `inventory`
--
ALTER TABLE `inventory` ADD `favorite` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
ADD `unique_id` BIGINT( 20 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `favorite` ;
--
-- Table changes for table `login`
--
ALTER TABLE `login` CHANGE `level` `group_id` TINYINT( 3 ) NOT NULL DEFAULT '0',
ADD `character_slots` TINYINT( 3 ) UNSIGNED NOT NULL DEFAULT '0',
ADD `pincode` VARCHAR(4) NOT NULL DEFAULT '',
ADD `pincode_change` INT(11) UNSIGNED NOT NULL DEFAULT '0';
--
-- Table changes for table `mail`
--
ALTER TABLE `mail` ADD `unique_id` BIGINT( 20 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `card3` ;
--
-- Table changes for table `skill`
--
ALTER TABLE `skill` ADD `flag` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `lv` ,
DROP INDEX `char_id` ;
--
-- Table drop for unused table `skillcooldown`.
--
DROP TABLE `skillcooldown` ;
--
-- Table changes for table `skill_homunculus`
--
ALTER TABLE `skill_homunculus` DROP INDEX `homun_id`;
--
-- Table structure for new table `sql_updates`
--
CREATE TABLE IF NOT EXISTS `sql_updates` (
`timestamp` INT(11) UNSIGNED NOT NULL,
`ignored` enum('Yes','No') NOT NULL DEFAULT 'No',
PRIMARY KEY (`timestamp`)
) ENGINE=MyISAM;
-- Existent updates to enter
INSERT INTO `sql_updates` (`timestamp`) VALUES (1360858500);
INSERT INTO `sql_updates` (`timestamp`) VALUES (1360951560);
INSERT INTO `sql_updates` (`timestamp`) VALUES (1362445531);
INSERT INTO `sql_updates` (`timestamp`) VALUES (1362528000);
INSERT INTO `sql_updates` (`timestamp`) VALUES (1362794218);
INSERT INTO `sql_updates` (`timestamp`) VALUES (1364409316);
INSERT INTO `sql_updates` (`timestamp`) VALUES (1366075474);
INSERT INTO `sql_updates` (`timestamp`) VALUES (1366078541);
--
-- Table changes for table `storage`
--
ALTER TABLE `storage` ADD `unique_id` BIGINT( 20 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `expire_time` ;
--
-- Table structure for new table `interreg`
--
CREATE TABLE IF NOT EXISTS `interreg` (
`varname` VARCHAR(11) NOT NULL,
`value` VARCHAR(20) NOT NULL,
PRIMARY KEY (`varname`)
) ENGINE=InnoDB;
INSERT INTO `interreg` (`varname`, `value`) VALUES
('unique_id', '0');