From 9e922317933de98bb25146045ceb56ac4e6d1a24 Mon Sep 17 00:00:00 2001 From: Haru Date: Sat, 19 Dec 2015 16:11:43 +0100 Subject: Changed DB2SQL plugin to not cross-convert databases - To convert a renewal database, compile the server and plugin as renewal, and to convert a pre-renewal database, compile both as pre-renewal. - This is a necessary evil, for future compatibility. Signed-off-by: Haru --- src/plugins/db2sql.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/plugins/db2sql.c') diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c index abbb42ee0..32df45e84 100644 --- a/src/plugins/db2sql.c +++ b/src/plugins/db2sql.c @@ -43,6 +43,12 @@ HPExport struct hplugin_info pinfo = { HPM_VERSION, // HPM Version (don't change, macro is automatically updated) }; +#ifdef RENEWAL +#define DBSUFFIX "_re" +#else // not RENEWAL +#define DBSUFFIX "" +#endif + struct { FILE *fp; struct { @@ -336,8 +342,7 @@ void do_db2sql(void) const char *source; const char *destination; } files[] = { - {"item_db", "re/item_db.conf", "sql-files/item_db_re.sql"}, - {"item_db", "pre-re/item_db.conf", "sql-files/item_db.sql"}, + {"item_db", DBPATH"item_db.conf", "sql-files/item_db" DBSUFFIX ".sql"}, {"item_db2", "item_db2.conf", "sql-files/item_db2.sql"}, }; -- cgit v1.2.3-60-g2f50