From fda66ea34ea38924d27483836f1e0f1eebbc1a51 Mon Sep 17 00:00:00 2001 From: Galen Date: Wed, 14 Aug 2024 17:03:46 -0700 Subject: [PATCH] fix migration reversion of old search_component type values, re #10804 --- .../migrations/10804_core_search_filters.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/arches/app/models/migrations/10804_core_search_filters.py b/arches/app/models/migrations/10804_core_search_filters.py index ec48c72eaf8..1c1c9a68982 100644 --- a/arches/app/models/migrations/10804_core_search_filters.py +++ b/arches/app/models/migrations/10804_core_search_filters.py @@ -61,11 +61,24 @@ class Migration(migrations.Migration): reverse_sql = """ delete from search_component where searchcomponentid = '69695d63-6f03-4536-8da9-841b07116381'; UPDATE search_component SET enabled = true, sortorder = 2 where type != 'search-view'; + UPDATE search_component SET type = 'filter' where type like '%-type'; UPDATE search_component SET type = 'filter', sortorder = 1 where componentname = 'map-filter'; UPDATE search_component SET type = 'results-list' where componentname = 'search-results'; UPDATE search_component SET type = 'text-input' where componentname = 'term-filter'; UPDATE search_component SET componentpath = '' where componentpath is null; - UPDATE search_component SET type = 'filter' where type like '%-type'; + UPDATE search_component SET type = 'inline-filter' + where componentname in ( + 'sort-results', + 'provisional-filter', + 'paging-filter', + 'resource-type-filter' + ); + UPDATE search_component SET type = 'popup' where componentname in ( + 'time-filter', + 'search-export', + 'saved-searches' + ); + """ operations = [