summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/db.c15
-rw-r--r--ttools.c3
2 files changed, 11 insertions, 7 deletions
diff --git a/lib/db.c b/lib/db.c
index 271c6ae..9743dc3 100644
--- a/lib/db.c
+++ b/lib/db.c
@@ -737,15 +737,18 @@ int cDbTable::init(int allowAlter)
// check/create table ...
- if (exist() && allowAlter)
- validateStructure(allowAlter);
+ if (allowAlter)
+ {
+ if (exist())
+ validateStructure(allowAlter);
- if (createTable() != success)
- return fail;
+ if (!exist() && createTable() != success)
+ return fail;
- // check/create indices
+ // check/create indices
- createIndices();
+ createIndices();
+ }
// ------------------------------
// prepare BASIC statements
diff --git a/ttools.c b/ttools.c
index c3c93da..accd0fb 100644
--- a/ttools.c
+++ b/ttools.c
@@ -595,8 +595,9 @@ int enrichEvent(cEpgEvent* event, cDbTable* table, cDbStatement* select)
"imagecount", // int
"numrating", // int
- "channelid", // ascii 50
+// "source" // ascii 25
"year", // ascii 10
+ "channelid", // ascii 50
"category", // ascii 50
"country", // ascii 50
"audio", // ascii 50