From 7b26f21af6843bdcfb7e2405edf67068afd40a5e Mon Sep 17 00:00:00 2001 From: horchi Date: Mon, 10 Feb 2020 15:07:11 +0100 Subject: 2020-02-10: version 1.1.153 (horchi)\n - added: More debug messages\n\n --- HISTORY.h | 5 ++++- lib/db.c | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/HISTORY.h b/HISTORY.h index 93d54a8..f9bd409 100644 --- a/HISTORY.h +++ b/HISTORY.h @@ -4,7 +4,7 @@ * ----------------------------------- */ -#define _VERSION "1.1.152" +#define _VERSION "1.1.153" #define VERSION_DATE "10.02.2020" #define DB_API 7 @@ -18,6 +18,9 @@ * ------------------------------------ * +2020-02-10: version 1.1.153 (horchi) + - added: More debug messages + 2020-02-10: version 1.1.152 (horchi) - bugfix: Fixed problem with detection of table changes diff --git a/lib/db.c b/lib/db.c index 12cbcae..c5ae11b 100644 --- a/lib/db.c +++ b/lib/db.c @@ -960,6 +960,10 @@ int cDbTable::validateStructure(int allowAlter) tell(5, "Debug: Description of '%s' changed from '%s' to '%s'", getField(i)->getDbName(), fieldInfo->description.c_str(), getField(i)->getDescription()); + if (strcasecmp(fieldInfo->def.c_str(), getField(i)->getDefault()) != 0 && !(getField(i)->getType() & ftPrimary)) + tell(5, "Debug: Default value of '%s' changed from from '%s' to '%s'", getField(i)->getDbName(), + fieldInfo->def.c_str(), getField(i)->getDefault()); + alterModifyField(getField(i)); } } -- cgit v1.2.3