summaryrefslogtreecommitdiff
path: root/sql-files
diff options
context:
space:
mode:
Diffstat (limited to 'sql-files')
-rw-r--r--sql-files/convert_engine.sql22
-rw-r--r--sql-files/convert_engine_innodb.sql38
-rw-r--r--sql-files/convert_engine_myisam.sql38
-rw-r--r--sql-files/logs.sql22
-rw-r--r--sql-files/main.sql19
-rw-r--r--sql-files/upgrade_svn10575_db.sql11
-rw-r--r--sql-files/upgrade_svn10575_log.sql11
-rw-r--r--sql-files/upgrade_svn8423.sql1
-rw-r--r--sql-files/upgrade_svn8630.sql1
-rw-r--r--sql-files/upgrade_svn8675.sql1
-rw-r--r--sql-files/upgrade_svn8728.sql4
-rw-r--r--sql-files/upgrade_svn9050.sql6
-rw-r--r--sql-files/upgrade_svn9135.sql2
-rw-r--r--sql-files/upgrade_svn9957.sql1
-rw-r--r--sql-files/upgrade_svn9976.sql1
15 files changed, 117 insertions, 61 deletions
diff --git a/sql-files/convert_engine.sql b/sql-files/convert_engine.sql
deleted file mode 100644
index 9db50748e..000000000
--- a/sql-files/convert_engine.sql
+++ /dev/null
@@ -1,22 +0,0 @@
---
--- eAthena Database Converter ( InnoDB -> MyISAM ) by Jaguar
---
-
-ALTER TABLE `sc_data` DROP FOREIGN KEY `scdata_ibfk_1`, DROP FOREIGN KEY `scdata_ibfk_2`;
-ALTER TABLE `guild` DROP FOREIGN KEY `guild_ibfk_1`;
-ALTER TABLE `guild_alliance` DROP FOREIGN KEY `guild_alliance_ibfk_1`, DROP FOREIGN KEY `guild_alliance_ibfk_2`;
-ALTER TABLE `guild_expulsion` DROP FOREIGN KEY `guild_expulsion_ibfk_1`;
-ALTER TABLE `guild_member` DROP FOREIGN KEY `guild_member_ibfk_1`, DROP FOREIGN KEY `guild_member_ibfk_2`;
-ALTER TABLE `guild_position` DROP FOREIGN KEY `guild_position_ibfk_1`;
-ALTER TABLE `guild_skill` DROP FOREIGN KEY `guild_skill_ibfk_1`;
-ALTER TABLE `guild_storage` DROP FOREIGN KEY `guild_storage_ibfk_1`;
-ALTER TABLE `sc_data` TYPE = MYISAM;
-ALTER TABLE `login` TYPE = MYISAM;
-ALTER TABLE `char` TYPE = MYISAM;
-ALTER TABLE `guild` TYPE = MYISAM;
-ALTER TABLE `guild_alliance` TYPE = MYISAM;
-ALTER TABLE `guild_expulsion` TYPE = MYISAM;
-ALTER TABLE `guild_member` TYPE = MYISAM;
-ALTER TABLE `guild_position` TYPE = MYISAM;
-ALTER TABLE `guild_skill` TYPE = MYISAM;
-ALTER TABLE `guild_storage` TYPE = MYISAM;
diff --git a/sql-files/convert_engine_innodb.sql b/sql-files/convert_engine_innodb.sql
new file mode 100644
index 000000000..f2610a775
--- /dev/null
+++ b/sql-files/convert_engine_innodb.sql
@@ -0,0 +1,38 @@
+--
+-- eAthena Database Converter ( MyISAM -> InnoDB )
+--
+
+ALTER TABLE `cart_inventory` TYPE = InnoDB;
+ALTER TABLE `char` TYPE = InnoDB;
+ALTER TABLE `charlog` TYPE = InnoDB;
+ALTER TABLE `friends` TYPE = InnoDB;
+ALTER TABLE `global_reg_value` TYPE = InnoDB;
+ALTER TABLE `guild` TYPE = InnoDB;
+ALTER TABLE `guild_alliance` TYPE = InnoDB;
+ALTER TABLE `guild_castle` TYPE = InnoDB;
+ALTER TABLE `guild_expulsion` TYPE = InnoDB;
+ALTER TABLE `guild_member` TYPE = InnoDB;
+ALTER TABLE `guild_position` TYPE = InnoDB;
+ALTER TABLE `guild_skill` TYPE = InnoDB;
+ALTER TABLE `guild_storage` TYPE = InnoDB;
+ALTER TABLE `homunculus` TYPE = InnoDB;
+ALTER TABLE `interlog` TYPE = InnoDB;
+ALTER TABLE `inventory` TYPE = InnoDB;
+ALTER TABLE `ipbanlist` TYPE = InnoDB;
+ALTER TABLE `item_db` TYPE = InnoDB;
+ALTER TABLE `item_db2` TYPE = InnoDB;
+ALTER TABLE `login` TYPE = InnoDB;
+#ALTER TABLE `loginlog` TYPE = InnoDB;
+#ALTER TABLE `mail` TYPE = InnoDB;
+ALTER TABLE `mapreg` TYPE = InnoDB;
+ALTER TABLE `memo` TYPE = InnoDB;
+ALTER TABLE `mob_db` TYPE = InnoDB;
+ALTER TABLE `mob_db2` TYPE = InnoDB;
+ALTER TABLE `party` TYPE = InnoDB;
+ALTER TABLE `pet` TYPE = InnoDB;
+ALTER TABLE `ragsrvinfo` TYPE = InnoDB;
+ALTER TABLE `sc_data` TYPE = InnoDB;
+ALTER TABLE `skill` TYPE = InnoDB;
+ALTER TABLE `skill_homunculus` TYPE = InnoDB;
+ALTER TABLE `sstatus` TYPE = InnoDB;
+ALTER TABLE `storage` TYPE = InnoDB;
diff --git a/sql-files/convert_engine_myisam.sql b/sql-files/convert_engine_myisam.sql
new file mode 100644
index 000000000..aec1d38dc
--- /dev/null
+++ b/sql-files/convert_engine_myisam.sql
@@ -0,0 +1,38 @@
+--
+-- eAthena Database Converter ( InnoDB -> MyISAM )
+--
+
+ALTER TABLE `cart_inventory` TYPE = MYISAM;
+ALTER TABLE `char` TYPE = MYISAM;
+ALTER TABLE `charlog` TYPE = MYISAM;
+ALTER TABLE `friends` TYPE = MYISAM;
+ALTER TABLE `global_reg_value` TYPE = MYISAM;
+ALTER TABLE `guild` TYPE = MYISAM;
+ALTER TABLE `guild_alliance` TYPE = MYISAM;
+ALTER TABLE `guild_castle` TYPE = MYISAM;
+ALTER TABLE `guild_expulsion` TYPE = MYISAM;
+ALTER TABLE `guild_member` TYPE = MYISAM;
+ALTER TABLE `guild_position` TYPE = MYISAM;
+ALTER TABLE `guild_skill` TYPE = MYISAM;
+ALTER TABLE `guild_storage` TYPE = MYISAM;
+ALTER TABLE `homunculus` TYPE = MYISAM;
+ALTER TABLE `interlog` TYPE = MYISAM;
+ALTER TABLE `inventory` TYPE = MYISAM;
+ALTER TABLE `ipbanlist` TYPE = MYISAM;
+ALTER TABLE `item_db` TYPE = MYISAM;
+ALTER TABLE `item_db2` TYPE = MYISAM;
+ALTER TABLE `login` TYPE = MYISAM;
+#ALTER TABLE `loginlog` TYPE = MYISAM;
+#ALTER TABLE `mail` TYPE = MYISAM;
+ALTER TABLE `mapreg` TYPE = MYISAM;
+ALTER TABLE `memo` TYPE = MYISAM;
+ALTER TABLE `mob_db` TYPE = MYISAM;
+ALTER TABLE `mob_db2` TYPE = MYISAM;
+ALTER TABLE `party` TYPE = MYISAM;
+ALTER TABLE `pet` TYPE = MYISAM;
+ALTER TABLE `ragsrvinfo` TYPE = MYISAM;
+ALTER TABLE `sc_data` TYPE = MYISAM;
+ALTER TABLE `skill` TYPE = MYISAM;
+ALTER TABLE `skill_homunculus` TYPE = MYISAM;
+ALTER TABLE `sstatus` TYPE = MYISAM;
+ALTER TABLE `storage` TYPE = MYISAM;
diff --git a/sql-files/logs.sql b/sql-files/logs.sql
index aa0ead7d8..1c7e535c8 100644
--- a/sql-files/logs.sql
+++ b/sql-files/logs.sql
@@ -1,6 +1,6 @@
#Pick_Log types (M)onsters Drop, (P)layers Drop/Take, Mobs Drop (L)oot Drop/Take,
# Players (T)rade Give/Take, Players (V)ending Sell/Take, (S)hop Sell/Take, (N)PC Give/Take,
-# (C)onsumable Items, (A)dministrators Create/Delete
+# (C)onsumable Items, (A)dministrators Create/Delete, Sto(R)age, (G)uild Storage
#Database: log
#Table: picklog
@@ -8,7 +8,7 @@ CREATE TABLE `picklog` (
`id` int(11) NOT NULL auto_increment,
`time` datetime NOT NULL default '0000-00-00 00:00:00',
`char_id` int(11) NOT NULL default '0',
- `type` set('M','P','L','T','V','S','N','C','A','R','G') NOT NULL default 'P',
+ `type` enum('M','P','L','T','V','S','N','C','A','R','G') NOT NULL default 'P',
`nameid` int(11) NOT NULL default '0',
`amount` int(11) NOT NULL default '1',
`refine` tinyint(3) unsigned NOT NULL default '0',
@@ -16,7 +16,7 @@ CREATE TABLE `picklog` (
`card1` int(11) NOT NULL default '0',
`card2` int(11) NOT NULL default '0',
`card3` int(11) NOT NULL default '0',
- `map` varchar(20) NOT NULL default 'prontera.gat',
+ `map` varchar(11) NOT NULL default '',
PRIMARY KEY (`id`),
INDEX (`type`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
@@ -29,9 +29,9 @@ CREATE TABLE `zenylog` (
`time` datetime NOT NULL default '0000-00-00 00:00:00',
`char_id` int(11) NOT NULL default '0',
`src_id` int(11) NOT NULL default '0',
- `type` set('M','T','V','S','N','A') NOT NULL default 'S',
+ `type` enum('M','T','V','S','N','A') NOT NULL default 'S',
`amount` int(11) NOT NULL default '0',
- `map` varchar(20) NOT NULL default 'prontera.gat',
+ `map` varchar(11) NOT NULL default '',
PRIMARY KEY (`id`),
INDEX (`type`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
@@ -44,7 +44,7 @@ CREATE TABLE `branchlog` (
`account_id` int(11) NOT NULL default '0',
`char_id` int(11) NOT NULL default '0',
`char_name` varchar(30) NOT NULL default '',
- `map` varchar(20) NOT NULL default 'prontera.gat',
+ `map` varchar(11) NOT NULL default '',
PRIMARY KEY (`branch_id`),
INDEX (`account_id`),
INDEX (`char_id`)
@@ -59,7 +59,7 @@ CREATE TABLE `mvplog` (
`monster_id` smallint(6) NOT NULL default '0',
`prize` int(11) NOT NULL default '0',
`mvpexp` mediumint(9) NOT NULL default '0',
- `map` varchar(20) NOT NULL default 'prontera.gat',
+ `map` varchar(11) NOT NULL default '',
PRIMARY KEY (`mvp_id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
@@ -71,7 +71,7 @@ CREATE TABLE `atcommandlog` (
`account_id` int(11) unsigned NOT NULL default '0',
`char_id` int(11) unsigned NOT NULL default '0',
`char_name` varchar(30) NOT NULL default '',
- `map` varchar(20) NOT NULL default 'prontera.gat',
+ `map` varchar(11) NOT NULL default '',
`command` varchar(50) NOT NULL default '',
PRIMARY KEY (`atcommand_id`),
INDEX (`account_id`),
@@ -86,7 +86,7 @@ CREATE TABLE `npclog` (
`account_id` int(11) unsigned NOT NULL default '0',
`char_id` int(11) unsigned NOT NULL default '0',
`char_name` varchar(30) NOT NULL default '',
- `map` varchar(20) NOT NULL default 'prontera.gat',
+ `map` varchar(11) NOT NULL default '',
`mes` varchar(255) NOT NULL default '',
PRIMARY KEY (`npc_id`),
INDEX (`account_id`),
@@ -97,11 +97,11 @@ CREATE TABLE `npclog` (
CREATE TABLE `chatlog` (
`id` bigint(20) NOT NULL auto_increment,
`time` datetime NOT NULL default '0000-00-00 00:00:00',
- `type` set('W','P','G') NOT NULL default 'W',
+ `type` enum('W','P','G') NOT NULL default 'W',
`type_id` int(11) NOT NULL default '0',
`src_charid` int(11) NOT NULL default '0',
`src_accountid` int(11) NOT NULL default '0',
- `src_map` varchar(17) NOT NULL default 'prontera.gat',
+ `src_map` varchar(11) NOT NULL default '',
`src_map_x` smallint(4) NOT NULL default '0',
`src_map_y` smallint(4) NOT NULL default '0',
`dst_charname` varchar(25) NOT NULL default '',
diff --git a/sql-files/main.sql b/sql-files/main.sql
index c7c45d3c5..e86d36e7b 100644
--- a/sql-files/main.sql
+++ b/sql-files/main.sql
@@ -1,6 +1,3 @@
--- MySQL dump 9.11
--- Server version 4.0.24
-
--
-- Table structure for table `cart_inventory`
--
@@ -66,10 +63,10 @@ CREATE TABLE `char` (
`head_top` smallint(6) unsigned NOT NULL default '0',
`head_mid` smallint(6) unsigned NOT NULL default '0',
`head_bottom` smallint(6) unsigned NOT NULL default '0',
- `last_map` varchar(20) NOT NULL default 'prontera.gat',
+ `last_map` varchar(11) NOT NULL default '',
`last_x` smallint(4) unsigned NOT NULL default '53',
`last_y` smallint(4) unsigned NOT NULL default '111',
- `save_map` varchar(20) NOT NULL default 'prontera.gat',
+ `save_map` varchar(11) NOT NULL default '',
`save_x` smallint(4) unsigned NOT NULL default '53',
`save_y` smallint(4) unsigned NOT NULL default '111',
`partner_id` int(11) unsigned NOT NULL default '0',
@@ -389,9 +386,9 @@ CREATE TABLE `login` (
`userid` varchar(255) NOT NULL default '',
`user_pass` varchar(32) NOT NULL default '',
`lastlogin` datetime NOT NULL default '0000-00-00 00:00:00',
- `sex` char(1) NOT NULL default 'M',
+ `sex` enum('M','F','S') NOT NULL default 'M',
`logincount` mediumint(9) unsigned NOT NULL default '0',
- `email` varchar(60) NOT NULL default '',
+ `email` varchar(39) NOT NULL default '',
`level` tinyint(3) NOT NULL default '0',
`error_message` smallint(11) unsigned NOT NULL default '0',
`connect_until` int(11) unsigned NOT NULL default '0',
@@ -461,9 +458,9 @@ DROP TABLE IF EXISTS `memo`;
CREATE TABLE `memo` (
`memo_id` int(11) unsigned NOT NULL auto_increment,
`char_id` int(11) unsigned NOT NULL default '0',
- `map` varchar(255) NOT NULL default '',
- `x` smallint(9) unsigned NOT NULL default '0',
- `y` smallint(9) unsigned NOT NULL default '0',
+ `map` varchar(11) NOT NULL default '',
+ `x` smallint(4) unsigned NOT NULL default '0',
+ `y` smallint(4) unsigned NOT NULL default '0',
PRIMARY KEY (`memo_id`),
KEY `char_id` (`char_id`)
) TYPE=MyISAM;
@@ -475,7 +472,7 @@ CREATE TABLE `memo` (
DROP TABLE IF EXISTS `party`;
CREATE TABLE `party` (
`party_id` int(11) unsigned NOT NULL auto_increment,
- `name` char(100) NOT NULL default '',
+ `name` varchar(100) NOT NULL default '',
`exp` tinyint(11) unsigned NOT NULL default '0',
`item` tinyint(11) unsigned NOT NULL default '0',
`leader_id` int(11) unsigned NOT NULL default '0',
diff --git a/sql-files/upgrade_svn10575_db.sql b/sql-files/upgrade_svn10575_db.sql
new file mode 100644
index 000000000..90d8fb27a
--- /dev/null
+++ b/sql-files/upgrade_svn10575_db.sql
@@ -0,0 +1,11 @@
+ALTER TABLE `login` CHANGE `email` `email` VARCHAR( 39 ) NOT NULL;
+ALTER TABLE `login` CHANGE `sex` `sex` ENUM( 'M', 'F', 'S' ) NOT NULL DEFAULT 'M';
+
+ALTER TABLE `char` CHANGE `last_map` `last_map` VARCHAR( 11 ) NOT NULL;
+ALTER TABLE `char` CHANGE `save_map` `save_map` VARCHAR( 11 ) NOT NULL;
+
+ALTER TABLE `memo` CHANGE `map` `map` VARCHAR( 11 ) NOT NULL;
+ALTER TABLE `memo` CHANGE `x` `x` SMALLINT( 4 ) UNSIGNED NOT NULL DEFAULT '0';
+ALTER TABLE `memo` CHANGE `y` `y` SMALLINT( 4 ) UNSIGNED NOT NULL DEFAULT '0';
+
+ALTER TABLE `party` CHANGE `name` `name` VARCHAR( 24 ) NOT NULL;
diff --git a/sql-files/upgrade_svn10575_log.sql b/sql-files/upgrade_svn10575_log.sql
new file mode 100644
index 000000000..d6b4dd680
--- /dev/null
+++ b/sql-files/upgrade_svn10575_log.sql
@@ -0,0 +1,11 @@
+ALTER TABLE `picklog` CHANGE `type` `type` ENUM( 'M', 'P', 'L', 'T', 'V', 'S', 'N', 'C', 'A', 'R', 'G' ) NOT NULL DEFAULT 'P';
+ALTER TABLE `zenylog` CHANGE `type` `type` ENUM( 'M', 'T', 'V', 'S', 'N', 'A' ) NOT NULL DEFAULT 'S';
+ALTER TABLE `chatlog` CHANGE `type` `type` ENUM( 'W', 'P', 'G' ) NOT NULL DEFAULT 'W';
+
+ALTER TABLE `picklog` CHANGE `map` `map` VARCHAR( 11 ) NOT NULL;
+ALTER TABLE `zenylog` CHANGE `map` `map` VARCHAR( 11 ) NOT NULL;
+ALTER TABLE `branchlog` CHANGE `map` `map` VARCHAR( 11 ) NOT NULL;
+ALTER TABLE `mvplog` CHANGE `map` `map` VARCHAR( 11 ) NOT NULL;
+ALTER TABLE `atcommandlog` CHANGE `map` `map` VARCHAR( 11 ) NOT NULL;
+ALTER TABLE `npclog` CHANGE `map` `map` VARCHAR( 11 ) NOT NULL;
+ALTER TABLE `chatlog` CHANGE `src_map` `src_map` VARCHAR( 11 ) NOT NULL;
diff --git a/sql-files/upgrade_svn8423.sql b/sql-files/upgrade_svn8423.sql
deleted file mode 100644
index e736d9365..000000000
--- a/sql-files/upgrade_svn8423.sql
+++ /dev/null
@@ -1 +0,0 @@
-update guild set name=REPLACE(name,'\\\'','\''); \ No newline at end of file
diff --git a/sql-files/upgrade_svn8630.sql b/sql-files/upgrade_svn8630.sql
deleted file mode 100644
index 33e218eb2..000000000
--- a/sql-files/upgrade_svn8630.sql
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE `login` MODIFY `connect_until` int(11) unsigned NOT NULL default '0';
diff --git a/sql-files/upgrade_svn8675.sql b/sql-files/upgrade_svn8675.sql
deleted file mode 100644
index 1499a748b..000000000
--- a/sql-files/upgrade_svn8675.sql
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE `guild` MODIFY `emblem_data` blob;
diff --git a/sql-files/upgrade_svn8728.sql b/sql-files/upgrade_svn8728.sql
deleted file mode 100644
index 5a45f87c4..000000000
--- a/sql-files/upgrade_svn8728.sql
+++ /dev/null
@@ -1,4 +0,0 @@
-ALTER TABLE `friends` ADD INDEX ( `char_id` );
-ALTER TABLE `memo` ADD INDEX ( `char_id` );
-ALTER TABLE `char` ADD INDEX ( `name` );
-ALTER TABLE `char` ADD INDEX ( `online` );
diff --git a/sql-files/upgrade_svn9050.sql b/sql-files/upgrade_svn9050.sql
deleted file mode 100644
index 2e0c72489..000000000
--- a/sql-files/upgrade_svn9050.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-ALTER TABLE `picklog` ADD INDEX (`type`);
-ALTER TABLE `zenylog` ADD INDEX (`type`);
-ALTER TABLE `branchlog` ADD INDEX (`account_id`), ADD INDEX (`char_id`);
-ALTER TABLE `atcommandlog` ADD INDEX (`account_id`), ADD INDEX (`char_id`);
-ALTER TABLE `npclog` ADD INDEX (`account_id`), ADD INDEX (`char_id`);
-ALTER TABLE `chatlog` ADD INDEX (`src_accountid`), ADD INDEX (`src_charid`);
diff --git a/sql-files/upgrade_svn9135.sql b/sql-files/upgrade_svn9135.sql
deleted file mode 100644
index 4b618a5ad..000000000
--- a/sql-files/upgrade_svn9135.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-alter table `item_db` modify `view` smallint(3) unsigned default null;
-alter table `item_db2` modify `view` smallint(3) unsigned default null; \ No newline at end of file
diff --git a/sql-files/upgrade_svn9957.sql b/sql-files/upgrade_svn9957.sql
deleted file mode 100644
index c8b2e0711..000000000
--- a/sql-files/upgrade_svn9957.sql
+++ /dev/null
@@ -1 +0,0 @@
-alter table `loginlog` modify `user` varchar(255) NOT NULL default ''; \ No newline at end of file
diff --git a/sql-files/upgrade_svn9976.sql b/sql-files/upgrade_svn9976.sql
deleted file mode 100644
index 82902bff6..000000000
--- a/sql-files/upgrade_svn9976.sql
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE `picklog` MODIFY `type` set('M','P','L','T','V','S','N','C','A','R','G') NOT NULL default 'P';