summaryrefslogtreecommitdiff
path: root/sql-files
diff options
context:
space:
mode:
Diffstat (limited to 'sql-files')
-rw-r--r--sql-files/convert_engine_innodb.sql2
-rw-r--r--sql-files/convert_engine_myisam.sql2
-rw-r--r--sql-files/main.sql16
-rw-r--r--sql-files/upgrade_svn13166_mercenary_owner.sql21
4 files changed, 41 insertions, 0 deletions
diff --git a/sql-files/convert_engine_innodb.sql b/sql-files/convert_engine_innodb.sql
index 1402886c7..9d8c7a85f 100644
--- a/sql-files/convert_engine_innodb.sql
+++ b/sql-files/convert_engine_innodb.sql
@@ -28,6 +28,8 @@ ALTER TABLE `login` ENGINE = InnoDB;
ALTER TABLE `mail` ENGINE = InnoDB;
ALTER TABLE `mapreg` ENGINE = InnoDB;
ALTER TABLE `memo` ENGINE = InnoDB;
+ALTER TABLE `mercenary` ENGINE = InnoDB;
+ALTER TABLE `mercenary_owner` ENGINE = InnoDB;
#ALTER TABLE `mob_db` ENGINE = InnoDB;
#ALTER TABLE `mob_db2` ENGINE = InnoDB;
ALTER TABLE `party` ENGINE = InnoDB;
diff --git a/sql-files/convert_engine_myisam.sql b/sql-files/convert_engine_myisam.sql
index 336d6ce9d..9e9080157 100644
--- a/sql-files/convert_engine_myisam.sql
+++ b/sql-files/convert_engine_myisam.sql
@@ -28,6 +28,8 @@ ALTER TABLE `login` ENGINE = MyISAM;
ALTER TABLE `mail` ENGINE = MyISAM;
ALTER TABLE `mapreg` ENGINE = MyISAM;
ALTER TABLE `memo` ENGINE = MyISAM;
+ALTER TABLE `mercenary` ENGINE = MyISAM;
+ALTER TABLE `mercenary_owner` ENGINE = MyISAM;
#ALTER TABLE `mob_db` ENGINE = MyISAM;
#ALTER TABLE `mob_db2` ENGINE = MyISAM;
ALTER TABLE `party` ENGINE = MyISAM;
diff --git a/sql-files/main.sql b/sql-files/main.sql
index a5c23421a..346e19ca1 100644
--- a/sql-files/main.sql
+++ b/sql-files/main.sql
@@ -498,6 +498,22 @@ CREATE TABLE IF NOT EXISTS `mercenary` (
) ENGINE=MyISAM;
--
+-- 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;
+
+--
-- Table structure for table `party`
--
diff --git a/sql-files/upgrade_svn13166_mercenary_owner.sql b/sql-files/upgrade_svn13166_mercenary_owner.sql
new file mode 100644
index 000000000..da7728cbe
--- /dev/null
+++ b/sql-files/upgrade_svn13166_mercenary_owner.sql
@@ -0,0 +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;