diff options
author | horchi <vdr@jwendel.de> | 2017-03-19 15:26:57 +0100 |
---|---|---|
committer | horchi <vdr@jwendel.de> | 2017-03-19 15:26:57 +0100 |
commit | 4ab12d84b2738fbfc9aafed6b4710180aa2d37e4 (patch) | |
tree | ca3e6cf76e14ab4af4f6655dc8f764fb1e927a8d /lib | |
parent | 4c2906c0ee6947cd8c04e36820e62e2e00fbc868 (diff) | |
download | vdr-epg-daemon-4ab12d84b2738fbfc9aafed6b4710180aa2d37e4.tar.gz vdr-epg-daemon-4ab12d84b2738fbfc9aafed6b4710180aa2d37e4.tar.bz2 |
minor imrovement of db api
Diffstat (limited to 'lib')
-rw-r--r-- | lib/db.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -734,15 +734,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 |