diff options
-rw-r--r-- | openbsc/src/db.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/openbsc/src/db.c b/openbsc/src/db.c index 90bee6925..9ad39d3da 100644 --- a/openbsc/src/db.c +++ b/openbsc/src/db.c @@ -161,12 +161,6 @@ int db_init(const char *name) { if (dbi_conn_connect(conn) < 0) goto out_err; - if (check_db_revision() < 0) { - fprintf(stderr, "Database schema revision invalid, " - "please update your database schema\n"); - goto out_err; - } - return 0; out_err: @@ -190,6 +184,12 @@ int db_prepare() { dbi_result_free(result); } + if (check_db_revision() < 0) { + fprintf(stderr, "Database schema revision invalid, " + "please update your database schema\n"); + return -1; + } + return 0; } |