Skip to content

Commit

Permalink
Modified db2sql plugin to maintain item_db2.sql
Browse files Browse the repository at this point in the history
makes it easier to keep the table structure up to date

Signed-off-by: shennetsind <ind@henn.et>
  • Loading branch information
shennetsind committed Nov 15, 2013
1 parent 008a128 commit 5b9ce29
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/plugins/db2sql.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 5b9ce29

Please sign in to comment.