From cac47610a0e6ed640a1f1eaa294890fbb17270d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Dugovi=C4=8D?= Date: Wed, 4 Feb 2026 09:23:18 +0100 Subject: [PATCH] RHINENG-21214: do not omit stale systems in migration This caused inconsistencies in dependant tables and culling will take care of proper removal later. --- database_admin/migrations/142_split_system_platform.up.sql | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/database_admin/migrations/142_split_system_platform.up.sql b/database_admin/migrations/142_split_system_platform.up.sql index 829d7e31e..5f1d900b4 100644 --- a/database_admin/migrations/142_split_system_platform.up.sql +++ b/database_admin/migrations/142_split_system_platform.up.sql @@ -105,8 +105,7 @@ INSERT INTO system_inventory ( stale_timestamp, stale_warning_timestamp, culled_timestamp -FROM system_platform sp -WHERE sp.stale = false; +FROM system_platform sp; SELECT setval('system_inventory_id_seq', (SELECT MAX(id) FROM system_inventory)); @@ -578,8 +577,7 @@ INSERT INTO system_patch SELECT applicable_advisory_bug_count_cache, applicable_advisory_sec_count_cache, template_id -FROM system_platform sp -WHERE sp.stale = false; +FROM system_platform sp; do $$ begin RAISE NOTICE 'Data loaded into system_patch'; end $$;