From bfa8982cc6736a6d51d23e0a0c009d7a05fe706e Mon Sep 17 00:00:00 2001
From: Alex ORLUC <alex.orluc@maarch.org>
Date: Wed, 13 May 2020 15:02:15 +0000
Subject: [PATCH] FIX #13860 TIME 0:25 remove delete default action in
 migration

(cherry picked from commit da037b3617cfa94de0d31f83f68955d9d076b65c)
---
 migration/20.03/2003.sql | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/migration/20.03/2003.sql b/migration/20.03/2003.sql
index 3819a3b7eb4..48fff5a64b8 100755
--- a/migration/20.03/2003.sql
+++ b/migration/20.03/2003.sql
@@ -87,10 +87,12 @@ UPDATE groupbasket SET list_event_data = '{"defaultTab":"info"}'
 WHERE list_event = 'processDocument' AND (list_event_data IS NULL OR list_event_data::text = '');
 
 -- /!\ Do not move : update actions AFTER all updates on groupbasket
-DELETE FROM actions_categories WHERE action_id in (SELECT id FROM actions WHERE component = 'viewDoc' OR action_page in ('view', 'validate_mail', 'process', 'visa_mail'));
-DELETE FROM actions_groupbaskets WHERE id_action in (SELECT id FROM actions WHERE component = 'viewDoc' OR action_page in ('view', 'validate_mail', 'process', 'visa_mail'));
-DELETE FROM groupbasket_redirect WHERE action_id in (SELECT id FROM actions WHERE component = 'viewDoc' OR action_page in ('view', 'validate_mail', 'process', 'visa_mail'));
-DELETE FROM actions WHERE component = 'viewDoc' OR action_page in ('view', 'validate_mail', 'process', 'visa_mail');
+UPDATE actions SET component = 'confirmAction', action_page = null  WHERE action_page in ('validate_mail', 'process', 'visa_mail');
+
+DELETE FROM actions_categories WHERE action_id in (SELECT id FROM actions WHERE component = 'viewDoc' OR action_page in ('view'));
+DELETE FROM actions_groupbaskets WHERE id_action in (SELECT id FROM actions WHERE component = 'viewDoc' OR action_page in ('view'));
+DELETE FROM groupbasket_redirect WHERE action_id in (SELECT id FROM actions WHERE component = 'viewDoc' OR action_page in ('view'));
+DELETE FROM actions WHERE component = 'viewDoc' OR action_page in ('view');
 
 ALTER TABLE actions DROP COLUMN IF EXISTS parameters;
 ALTER TABLE actions ADD COLUMN parameters jsonb NOT NULL DEFAULT '{}';
-- 
GitLab