summaryrefslogtreecommitdiff
path: root/sql-files
diff options
context:
space:
mode:
Diffstat (limited to 'sql-files')
-rw-r--r--sql-files/upgrade_svn12581.sql4
-rw-r--r--sql-files/upgrade_svn12975.sql48
-rw-r--r--sql-files/upgrade_svn12975_log.sql40
-rw-r--r--sql-files/upgrade_svn12975_view.sql34
-rw-r--r--sql-files/upgrade_svn13025_log.sql10
-rw-r--r--sql-files/upgrade_svn13115_mercenary.sql28
-rw-r--r--sql-files/upgrade_svn13166_mercenary_owner.sql42
-rw-r--r--sql-files/upgrade_svn13370_inventory.sql12
-rw-r--r--sql-files/upgrade_svn13881.sql2
-rw-r--r--sql-files/upgrade_svn13960_questlog.sql38
10 files changed, 129 insertions, 129 deletions
diff --git a/sql-files/upgrade_svn12581.sql b/sql-files/upgrade_svn12581.sql
index ce2ffd989..9b487d5e1 100644
--- a/sql-files/upgrade_svn12581.sql
+++ b/sql-files/upgrade_svn12581.sql
@@ -1,3 +1,3 @@
-ALTER TABLE `quest_objective` ADD COLUMN `char_id` INTEGER UNSIGNED NOT NULL AFTER `num`,
- DROP PRIMARY KEY,
+ALTER TABLE `quest_objective` ADD COLUMN `char_id` INTEGER UNSIGNED NOT NULL AFTER `num`,
+ DROP PRIMARY KEY,
ADD PRIMARY KEY USING BTREE(`quest_id`, `num`, `char_id`); \ No newline at end of file
diff --git a/sql-files/upgrade_svn12975.sql b/sql-files/upgrade_svn12975.sql
index a8f5e3818..26d78178e 100644
--- a/sql-files/upgrade_svn12975.sql
+++ b/sql-files/upgrade_svn12975.sql
@@ -1,24 +1,24 @@
-START TRANSACTION;
-
--- delete columns
-ALTER TABLE `login` DROP `error_message`;
-ALTER TABLE `login` DROP `memo`;
-
--- rename columns
-ALTER TABLE `login` CHANGE `connect_until` `expiration_time` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0';
-ALTER TABLE `login` CHANGE `ban_until` `unban_time` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0';
-
--- reorder columns
-ALTER TABLE `login` MODIFY `sex` enum('M','F','S') NOT NULL default 'M' AFTER `user_pass`;
-ALTER TABLE `login` MODIFY `email` varchar(39) NOT NULL default '' AFTER `sex`;
-ALTER TABLE `login` MODIFY `level` tinyint(3) NOT NULL default '0' AFTER `email`;
-ALTER TABLE `login` MODIFY `state` int(11) unsigned NOT NULL default '0' AFTER `level`;
-ALTER TABLE `login` MODIFY `unban_time` int(11) unsigned NOT NULL default '0' AFTER `state`;
-ALTER TABLE `login` MODIFY `expiration_time` int(11) unsigned NOT NULL default '0' AFTER `unban_time`;
-ALTER TABLE `login` MODIFY `logincount` mediumint(9) unsigned NOT NULL default '0' AFTER `expiration_time`;
-
--- change ip format
-ALTER TABLE `loginlog` CHANGE `ip` `ip` VARCHAR( 15 ) NOT NULL default '';
-UPDATE `loginlog` SET `ip` = inet_ntoa(`ip`);
-
-COMMIT;
+START TRANSACTION;
+
+-- delete columns
+ALTER TABLE `login` DROP `error_message`;
+ALTER TABLE `login` DROP `memo`;
+
+-- rename columns
+ALTER TABLE `login` CHANGE `connect_until` `expiration_time` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0';
+ALTER TABLE `login` CHANGE `ban_until` `unban_time` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0';
+
+-- reorder columns
+ALTER TABLE `login` MODIFY `sex` enum('M','F','S') NOT NULL default 'M' AFTER `user_pass`;
+ALTER TABLE `login` MODIFY `email` varchar(39) NOT NULL default '' AFTER `sex`;
+ALTER TABLE `login` MODIFY `level` tinyint(3) NOT NULL default '0' AFTER `email`;
+ALTER TABLE `login` MODIFY `state` int(11) unsigned NOT NULL default '0' AFTER `level`;
+ALTER TABLE `login` MODIFY `unban_time` int(11) unsigned NOT NULL default '0' AFTER `state`;
+ALTER TABLE `login` MODIFY `expiration_time` int(11) unsigned NOT NULL default '0' AFTER `unban_time`;
+ALTER TABLE `login` MODIFY `logincount` mediumint(9) unsigned NOT NULL default '0' AFTER `expiration_time`;
+
+-- change ip format
+ALTER TABLE `loginlog` CHANGE `ip` `ip` VARCHAR( 15 ) NOT NULL default '';
+UPDATE `loginlog` SET `ip` = inet_ntoa(`ip`);
+
+COMMIT;
diff --git a/sql-files/upgrade_svn12975_log.sql b/sql-files/upgrade_svn12975_log.sql
index c6900e606..3c9aa5cff 100644
--- a/sql-files/upgrade_svn12975_log.sql
+++ b/sql-files/upgrade_svn12975_log.sql
@@ -1,20 +1,20 @@
--- NOTE: change `ragnarok` and `log` to whatever your database names are.
-
-START TRANSACTION;
-
-CREATE TABLE `log`.`loginlog` (
- `time` datetime NOT NULL default '0000-00-00 00:00:00',
- `ip` varchar( 15 ) NOT NULL ,
- `user` varchar( 23 ) NOT NULL default '',
- `rcode` tinyint( 4 ) NOT NULL default '0',
- `log` varchar( 255 ) NOT NULL default '',
- KEY `ip` ( `ip` )
-) ENGINE = MYISAM;
-
-INSERT INTO `log`.`loginlog`
- SELECT *
- FROM `ragnarok`.`loginlog` ;
-
-DROP TABLE `ragnarok`.`loginlog` ;
-
-COMMIT;
+-- NOTE: change `ragnarok` and `log` to whatever your database names are.
+
+START TRANSACTION;
+
+CREATE TABLE `log`.`loginlog` (
+ `time` datetime NOT NULL default '0000-00-00 00:00:00',
+ `ip` varchar( 15 ) NOT NULL ,
+ `user` varchar( 23 ) NOT NULL default '',
+ `rcode` tinyint( 4 ) NOT NULL default '0',
+ `log` varchar( 255 ) NOT NULL default '',
+ KEY `ip` ( `ip` )
+) ENGINE = MYISAM;
+
+INSERT INTO `log`.`loginlog`
+ SELECT *
+ FROM `ragnarok`.`loginlog` ;
+
+DROP TABLE `ragnarok`.`loginlog` ;
+
+COMMIT;
diff --git a/sql-files/upgrade_svn12975_view.sql b/sql-files/upgrade_svn12975_view.sql
index a3d64f97e..2d65afd18 100644
--- a/sql-files/upgrade_svn12975_view.sql
+++ b/sql-files/upgrade_svn12975_view.sql
@@ -1,17 +1,17 @@
--- The statements below will create a 'view' (virtual table) that mimics
--- the previous `login` table layout. You can use this hack to make your db
--- compatible with older eathena servers or control panels.
--- Note: also adjust the account.sql.account_db setting in login_athena.conf.
--- Note: if your CP does not have a config setting for the `login` table name
--- you'll have to either modify its code or do some table renaming.
-
-START TRANSACTION;
-
--- create dummy columns, needed to make the view insertable
-ALTER TABLE `login` ADD `error_message` SMALLINT UNSIGNED NOT NULL DEFAULT '0';
-ALTER TABLE `login` ADD `memo` SMALLINT UNSIGNED NOT NULL DEFAULT '0';
-
--- create the view
-CREATE VIEW `login_view` ( `account_id`, `userid`, `user_pass`, `lastlogin`, `sex`, `logincount`, `email`, `level`, `error_message`, `connect_until`, `last_ip`, `memo`, `ban_until`, `state` ) AS SELECT `account_id`, `userid`, `user_pass`, `lastlogin`, `sex`, `logincount`, `email`, `level`, `error_message`, `expiration_time`, `last_ip`, `memo`, `unban_time`, `state` FROM `login`;
-
-COMMIT;
+-- The statements below will create a 'view' (virtual table) that mimics
+-- the previous `login` table layout. You can use this hack to make your db
+-- compatible with older eathena servers or control panels.
+-- Note: also adjust the account.sql.account_db setting in login_athena.conf.
+-- Note: if your CP does not have a config setting for the `login` table name
+-- you'll have to either modify its code or do some table renaming.
+
+START TRANSACTION;
+
+-- create dummy columns, needed to make the view insertable
+ALTER TABLE `login` ADD `error_message` SMALLINT UNSIGNED NOT NULL DEFAULT '0';
+ALTER TABLE `login` ADD `memo` SMALLINT UNSIGNED NOT NULL DEFAULT '0';
+
+-- create the view
+CREATE VIEW `login_view` ( `account_id`, `userid`, `user_pass`, `lastlogin`, `sex`, `logincount`, `email`, `level`, `error_message`, `connect_until`, `last_ip`, `memo`, `ban_until`, `state` ) AS SELECT `account_id`, `userid`, `user_pass`, `lastlogin`, `sex`, `logincount`, `email`, `level`, `error_message`, `expiration_time`, `last_ip`, `memo`, `unban_time`, `state` FROM `login`;
+
+COMMIT;
diff --git a/sql-files/upgrade_svn13025_log.sql b/sql-files/upgrade_svn13025_log.sql
index 702b30224..7d3084dd9 100644
--- a/sql-files/upgrade_svn13025_log.sql
+++ b/sql-files/upgrade_svn13025_log.sql
@@ -1,5 +1,5 @@
-START TRANSACTION;
-
-ALTER TABLE `zenylog` MODIFY COLUMN `type` enum('M','T','V','S','N','A','E') NOT NULL default 'S';
-
-COMMIT;
+START TRANSACTION;
+
+ALTER TABLE `zenylog` MODIFY COLUMN `type` enum('M','T','V','S','N','A','E') NOT NULL default 'S';
+
+COMMIT;
diff --git a/sql-files/upgrade_svn13115_mercenary.sql b/sql-files/upgrade_svn13115_mercenary.sql
index bcb7cff31..70356b361 100644
--- a/sql-files/upgrade_svn13115_mercenary.sql
+++ b/sql-files/upgrade_svn13115_mercenary.sql
@@ -1,14 +1,14 @@
---
--- Table structure for table `mercenary`
---
-
-CREATE TABLE IF NOT EXISTS `mercenary` (
- `mer_id` int(11) unsigned NOT NULL auto_increment,
- `char_id` int(11) NOT NULL,
- `class` mediumint(9) unsigned NOT NULL default '0',
- `hp` int(12) NOT NULL default '1',
- `sp` int(12) NOT NULL default '1',
- `kill_counter` int(11) NOT NULL,
- `life_time` int(11) NOT NULL default '0',
- PRIMARY KEY (`mer_id`)
-) ENGINE=MyISAM;
+--
+-- Table structure for table `mercenary`
+--
+
+CREATE TABLE IF NOT EXISTS `mercenary` (
+ `mer_id` int(11) unsigned NOT NULL auto_increment,
+ `char_id` int(11) NOT NULL,
+ `class` mediumint(9) unsigned NOT NULL default '0',
+ `hp` int(12) NOT NULL default '1',
+ `sp` int(12) NOT NULL default '1',
+ `kill_counter` int(11) NOT NULL,
+ `life_time` int(11) NOT NULL default '0',
+ PRIMARY KEY (`mer_id`)
+) ENGINE=MyISAM;
diff --git a/sql-files/upgrade_svn13166_mercenary_owner.sql b/sql-files/upgrade_svn13166_mercenary_owner.sql
index da7728cbe..29ecf8bf2 100644
--- a/sql-files/upgrade_svn13166_mercenary_owner.sql
+++ b/sql-files/upgrade_svn13166_mercenary_owner.sql
@@ -1,21 +1,21 @@
--- Removes mer_id from Char DB
-
-ALTER TABLE `char` DROP COLUMN `mer_id`;
-
--- Clean mercenary DB
-
-TRUNCATE TABLE `mercenary`;
-
--- Table structure for table `mercenary_owner`
-
-CREATE TABLE IF NOT EXISTS `mercenary_owner` (
- `char_id` int(11) NOT NULL,
- `merc_id` int(11) NOT NULL default '0',
- `arch_calls` int(11) NOT NULL default '0',
- `arch_faith` int(11) NOT NULL default '0',
- `spear_calls` int(11) NOT NULL default '0',
- `spear_faith` int(11) NOT NULL default '0',
- `sword_calls` int(11) NOT NULL default '0',
- `sword_faith` int(11) NOT NULL default '0',
- PRIMARY KEY (`char_id`)
-) ENGINE=MyISAM;
+-- Removes mer_id from Char DB
+
+ALTER TABLE `char` DROP COLUMN `mer_id`;
+
+-- Clean mercenary DB
+
+TRUNCATE TABLE `mercenary`;
+
+-- Table structure for table `mercenary_owner`
+
+CREATE TABLE IF NOT EXISTS `mercenary_owner` (
+ `char_id` int(11) NOT NULL,
+ `merc_id` int(11) NOT NULL default '0',
+ `arch_calls` int(11) NOT NULL default '0',
+ `arch_faith` int(11) NOT NULL default '0',
+ `spear_calls` int(11) NOT NULL default '0',
+ `spear_faith` int(11) NOT NULL default '0',
+ `sword_calls` int(11) NOT NULL default '0',
+ `sword_faith` int(11) NOT NULL default '0',
+ PRIMARY KEY (`char_id`)
+) ENGINE=MyISAM;
diff --git a/sql-files/upgrade_svn13370_inventory.sql b/sql-files/upgrade_svn13370_inventory.sql
index dc4d5ff8a..6a118ca4d 100644
--- a/sql-files/upgrade_svn13370_inventory.sql
+++ b/sql-files/upgrade_svn13370_inventory.sql
@@ -1,6 +1,6 @@
--- Creates expire_time column on Inventory
-
-ALTER TABLE `inventory` ADD COLUMN `expire_time` INT(11) UNSIGNED NOT NULL DEFAULT '0';
-ALTER TABLE `cart_inventory` ADD COLUMN `expire_time` INT(11) UNSIGNED NOT NULL DEFAULT '0';
-ALTER TABLE `storage` ADD COLUMN `expire_time` INT(11) UNSIGNED NOT NULL DEFAULT '0';
-ALTER TABLE `guild_storage` ADD COLUMN `expire_time` INT(11) UNSIGNED NOT NULL DEFAULT '0';
+-- Creates expire_time column on Inventory
+
+ALTER TABLE `inventory` ADD COLUMN `expire_time` INT(11) UNSIGNED NOT NULL DEFAULT '0';
+ALTER TABLE `cart_inventory` ADD COLUMN `expire_time` INT(11) UNSIGNED NOT NULL DEFAULT '0';
+ALTER TABLE `storage` ADD COLUMN `expire_time` INT(11) UNSIGNED NOT NULL DEFAULT '0';
+ALTER TABLE `guild_storage` ADD COLUMN `expire_time` INT(11) UNSIGNED NOT NULL DEFAULT '0';
diff --git a/sql-files/upgrade_svn13881.sql b/sql-files/upgrade_svn13881.sql
index a3ccad4b8..aae8962d2 100644
--- a/sql-files/upgrade_svn13881.sql
+++ b/sql-files/upgrade_svn13881.sql
@@ -1 +1 @@
-DELETE FROM `global_reg_value` WHERE `str`='COOKING_ATTEMPT';
+DELETE FROM `global_reg_value` WHERE `str`='COOKING_ATTEMPT';
diff --git a/sql-files/upgrade_svn13960_questlog.sql b/sql-files/upgrade_svn13960_questlog.sql
index c7a42960f..f176c5a6e 100644
--- a/sql-files/upgrade_svn13960_questlog.sql
+++ b/sql-files/upgrade_svn13960_questlog.sql
@@ -1,20 +1,20 @@
---
--- Table structure for table `questlog`
---
-
-CREATE TABLE IF NOT EXISTS `questlog` (
- `char_id` int(11) unsigned NOT NULL default '0',
- `quest_id` int(10) unsigned NOT NULL,
- `state` enum('2','1','0') NOT NULL default '0',
- `time` int(11) unsigned NOT NULL default '0',
- `mob1` mediumint(9) unsigned NOT NULL default '0',
- `count1` mediumint(8) unsigned NOT NULL default '0',
- `mob2` mediumint(9) unsigned NOT NULL default '0',
- `count2` mediumint(8) unsigned NOT NULL default '0',
- `mob3` mediumint(9) unsigned NOT NULL default '0',
- `count3` mediumint(8) unsigned NOT NULL default '0',
- PRIMARY KEY USING BTREE (`char_id`,`quest_id`)
-) ENGINE=MyISAM;
-
-DROP TABLE `quest_objective`;
+--
+-- Table structure for table `questlog`
+--
+
+CREATE TABLE IF NOT EXISTS `questlog` (
+ `char_id` int(11) unsigned NOT NULL default '0',
+ `quest_id` int(10) unsigned NOT NULL,
+ `state` enum('2','1','0') NOT NULL default '0',
+ `time` int(11) unsigned NOT NULL default '0',
+ `mob1` mediumint(9) unsigned NOT NULL default '0',
+ `count1` mediumint(8) unsigned NOT NULL default '0',
+ `mob2` mediumint(9) unsigned NOT NULL default '0',
+ `count2` mediumint(8) unsigned NOT NULL default '0',
+ `mob3` mediumint(9) unsigned NOT NULL default '0',
+ `count3` mediumint(8) unsigned NOT NULL default '0',
+ PRIMARY KEY USING BTREE (`char_id`,`quest_id`)
+) ENGINE=MyISAM;
+
+DROP TABLE `quest_objective`;
DROP TABLE `quest`; \ No newline at end of file