[tracker: 1/12] tracker-data-manager: Simplify create_decomposed_metadata_tables()
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker: 1/12] tracker-data-manager: Simplify create_decomposed_metadata_tables()
- Date: Sat, 8 May 2021 18:57:32 +0000 (UTC)
commit f3ef725e29e48e0f7578c812bd89295ce7b7a997
Author: Daniele Nicolodi <daniele grinta net>
Date: Mon May 3 20:57:55 2021 +0200
tracker-data-manager: Simplify create_decomposed_metadata_tables()
Drop argument to create_decomposed_metadata_tables() that is easier to
compute within the function.
src/libtracker-data/tracker-data-manager.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index 899606e47..21eb1028f 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -2802,7 +2802,6 @@ create_decomposed_metadata_tables (TrackerDataManager *manager,
const gchar *database,
TrackerClass *service,
gboolean in_update,
- gboolean in_change,
GError **error)
{
const char *service_name;
@@ -2813,6 +2812,7 @@ create_decomposed_metadata_tables (TrackerDataManager *manager,
GSList *class_properties = NULL, *field_it;
guint i, n_props;
gboolean in_alter = in_update;
+ gboolean in_change;
GError *internal_error = NULL;
GPtrArray *copy_schedule = NULL;
@@ -2827,6 +2827,8 @@ create_decomposed_metadata_tables (TrackerDataManager *manager,
return;
}
+ in_change = tracker_class_get_db_schema_changed (service);
+
if (in_change && !tracker_class_get_is_new (service)) {
TRACKER_NOTE (ONTOLOGY_CHANGES, g_message ("Rename: ALTER TABLE \"%s\" RENAME TO
\"%s_TEMP\"", service_name, service_name));
tracker_db_interface_execute_query (iface, &internal_error,
@@ -3253,7 +3255,6 @@ tracker_data_ontology_setup_db (TrackerDataManager *manager,
for (i = 0; i < n_classes; i++) {
/* Also !is_new classes are processed, they might have new properties */
create_decomposed_metadata_tables (manager, iface, database, classes[i], in_update,
- tracker_class_get_db_schema_changed (classes[i]),
&internal_error);
if (internal_error) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]