[db] Move database upgrade logic to separate file

This commit is contained in:
chme 2015-12-19 07:51:10 +01:00
parent 1d69a3de90
commit 3740486348
4 changed files with 1322 additions and 1222 deletions

View File

@ -71,6 +71,7 @@ forked_daapd_LDADD = -lrt \
forked_daapd_SOURCES = main.c \
db.c db.h \
db_upgrade.c db_upgrade.h \
logger.c logger.h \
conffile.c conffile.h \
cache.c cache.h \

1239
src/db.c

File diff suppressed because it is too large Load Diff

1277
src/db_upgrade.c Normal file

File diff suppressed because it is too large Load Diff

27
src/db_upgrade.h Normal file
View File

@ -0,0 +1,27 @@
/*
* Copyright (C) 2015 Christian Meffert <christian.meffert@googlemail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef SRC_DB_UPGRADE_H_
#define SRC_DB_UPGRADE_H_
#include <sqlite3.h>
int
db_upgrade(sqlite3 *hdl, int db_ver);
#endif /* SRC_DB_UPGRADE_H_ */