From: Jongkyu Koo Date: Thu, 18 Aug 2016 00:46:54 +0000 (+0900) Subject: if db version is the latest, skip db update X-Git-Tag: accepted/tizen/common/20160824.154539~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a20e640aae6849060013934d7771266b0c05cbfc;p=platform%2Fcore%2Fpim%2Fcontacts-service.git if db version is the latest, skip db update Change-Id: I78ac1759554b1a90723f482cb601d05d7da18788 Signed-off-by: Jongkyu Koo --- diff --git a/server/ctsvc_server_update.c b/server/ctsvc_server_update.c index 0cf980d..26d74dc 100644 --- a/server/ctsvc_server_update.c +++ b/server/ctsvc_server_update.c @@ -285,6 +285,11 @@ int ctsvc_server_db_update(void) /* check DB schema version */ __ctsvc_server_get_db_version(__db, &old_version); + if (CTSVC_SCHEMA_VERSION == old_version) { + db_util_close(__db); + return CONTACTS_ERROR_NONE; + } + /* Tizen 2.3a Releae 0.9.114.7 ('14/5) ----------------------------------- */ if (old_version <= 100) { ret = sqlite3_exec(__db, "CREATE INDEX name_lookup_idx1 ON name_lookup(contact_id);", NULL, 0, &errmsg);