Fix sql database creation script

This commit is contained in:
Ron Pedde 2005-03-21 05:07:05 +00:00
parent 17c7b8d875
commit 172802161f
1 changed files with 3 additions and 3 deletions

View File

@ -104,7 +104,7 @@ int db_sqlite_exec(int loglevel, char *fmt, ...) {
db_sqlite_unlock(); db_sqlite_unlock();
if(err != SQLITE_OK) { if(err != SQLITE_OK) {
DPRINTF(loglevel,L_DB,"Query: %s\n",query); DPRINTF(loglevel == E_FATAL ? E_LOG : loglevel,L_DB,"Query: %s\n",query);
DPRINTF(loglevel,L_DB,"Error: %s\n",perr); DPRINTF(loglevel,L_DB,"Error: %s\n",perr);
db_sqlite_lock(); db_sqlite_lock();
sqlite_freemem(query); sqlite_freemem(query);
@ -138,7 +138,7 @@ int db_sqlite_get_table(int loglevel, char ***resarray, int *rows, int *cols, ch
db_sqlite_unlock(); db_sqlite_unlock();
if(err != SQLITE_OK) { if(err != SQLITE_OK) {
DPRINTF(loglevel,L_DB,"Query: %s\n",query); DPRINTF(loglevel == E_FATAL ? E_LOG : loglevel,L_DB,"Query: %s\n",query);
DPRINTF(loglevel,L_DB,"Error: %s\n",perr); DPRINTF(loglevel,L_DB,"Error: %s\n",perr);
db_sqlite_lock(); db_sqlite_lock();
sqlite_freemem(query); sqlite_freemem(query);
@ -1244,7 +1244,7 @@ char *db_sqlite_upgrade_scripts[] = {
" sample_count INTEGER DEFAULT 0,\n" " sample_count INTEGER DEFAULT 0,\n"
" force_update INTEGER DEFAULT 0\n" " force_update INTEGER DEFAULT 0\n"
");\n" ");\n"
"CREATE INDEX idx_path ON songs(path)\n" "CREATE INDEX idx_path ON songs(path);\n"
"CREATE TABLE config (\n" "CREATE TABLE config (\n"
" term VARCHAR(255) NOT NULL,\n" " term VARCHAR(255) NOT NULL,\n"
" subterm VARCHAR(255) DEFAULT NULL,\n" " subterm VARCHAR(255) DEFAULT NULL,\n"