From d4cb8053b26f1f6c9529aedc837d3e68c3a5c86a Mon Sep 17 00:00:00 2001 From: Minje Ahn Date: Wed, 19 Feb 2020 10:05:34 +0900 Subject: [PATCH] Remove indexes from the media table Remove because it takes a long time to update the index Change-Id: I81627bbfac1895b750b6de7cb874bacb9826eaab Signed-off-by: Minje Ahn --- src/common/media-svc-db-utils.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/media-svc-db-utils.c b/src/common/media-svc-db-utils.c index c4603f4..3542fe7 100755 --- a/src/common/media-svc-db-utils.c +++ b/src/common/media-svc-db-utils.c @@ -201,7 +201,7 @@ static int __drop_views(uid_t uid) int ret = MS_MEDIA_ERR_NONE; char *sql = NULL; - sql = sqlite3_mprintf("DROP VIEW IF EXISTS %q;DROP VIEW IF EXISTS %q;DROP VIEW IF EXISTS %q", MEDIA_SVC_DB_VIEW_PLAYLIST, MEDIA_SVC_DB_VIEW_TAG, MEDIA_SVC_DB_VIEW_MEDIA); + sql = sqlite3_mprintf("DROP VIEW IF EXISTS %q;DROP VIEW IF EXISTS %q;DROP VIEW IF EXISTS %q", MEDIA_SVC_DB_VIEW_PLAYLIST, MEDIA_SVC_DB_VIEW_TAG, MEDIA_SVC_DB_VIEW_MEDIA); ret = _media_svc_sql_query(sql, uid); SQLITE3_SAFE_FREE(sql); @@ -444,7 +444,7 @@ int _media_svc_init_table_query(const char *event_table_name) media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret); ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_path", MEDIA_SVC_DB_TYPE_TEXT, "NOT NULL UNIQUE", USER_V2, NULL, false, false, true); media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret); - ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_display_name", MEDIA_SVC_DB_TYPE_TEXT, "NOT NULL", USER_V2, "media_file_name_idx", false, false, true); + ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_display_name", MEDIA_SVC_DB_TYPE_TEXT, "NOT NULL", USER_V2, NULL, false, false, true); media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret); ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_type", MEDIA_SVC_DB_TYPE_INT, NULL, USER_V2, NULL, false, false, true); media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret); @@ -454,9 +454,9 @@ int _media_svc_init_table_query(const char *event_table_name) media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret); ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_added_time", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V2, NULL, false, false, true); media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret); - ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_modified_time", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V2, "media_modified_time_idx", false, false, true); + ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_modified_time", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V2, NULL, false, false, true); media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret); - ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "folder_id", MEDIA_SVC_DB_TYPE_TEXT, "NOT NULL", USER_V2, "folder_uuid_idx", false, false, false); + ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "folder_id", MEDIA_SVC_DB_TYPE_TEXT, "NOT NULL", USER_V2, NULL, false, false, false); media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret); ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_thumbnail_path", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true); media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret); @@ -524,7 +524,7 @@ int _media_svc_init_table_query(const char *event_table_name) media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret); ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_storage_type", MEDIA_SVC_DB_TYPE_INT, NULL, USER_V2, NULL, false, false, true); media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret); - ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_timeline", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V2, "media_timeline_idx", false, false, true); + ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_timeline", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V2, NULL, false, false, true); media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret); ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "sync_status", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V2, NULL, false, false, true); media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret); -- 2.7.4