summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-11-15 03:23:17 -0200
committershennetsind <ind@henn.et>2013-11-15 03:23:17 -0200
commit5b9ce296cb99a54c5d2c5254c64154271b933917 (patch)
tree3d35ca2eeb159e248e0567c24f5aebb8866c4fcf /src/plugins
parent008a12832ed37818a835945dd55ffcb4f3862932 (diff)
downloadhercules-5b9ce296cb99a54c5d2c5254c64154271b933917.tar.gz
hercules-5b9ce296cb99a54c5d2c5254c64154271b933917.tar.bz2
hercules-5b9ce296cb99a54c5d2c5254c64154271b933917.tar.xz
hercules-5b9ce296cb99a54c5d2c5254c64154271b933917.zip
Modified db2sql plugin to maintain item_db2.sql
makes it easier to keep the table structure up to date Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/db2sql.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c
index e1ab26f30..47c85c2f0 100644
--- a/src/plugins/db2sql.c
+++ b/src/plugins/db2sql.c
@@ -155,6 +155,19 @@ void do_db2sql(void) {
fclose(tosql.fp);
+ if ((tosql.fp = fopen("sql-files/item_db2.sql", "wt+")) == NULL) {
+ ShowError("itemdb_tosql: File not found \"%s\".\n", "sql-files/item_db2.sql");
+ return;
+ }
+
+ tosql.db_name = map->item_db2_db;
+ totable();
+
+ itemdb->clear(false);
+ itemdb->readdb("item_db2.conf");
+
+ fclose(tosql.fp);
+
/* unlink */
itemdb->readdb_libconfig_sub = itemdb_readdb_libconfig_sub;