From 6ec36cf5fd19dd728d310451b38a85c88c598300 Mon Sep 17 00:00:00 2001
From: Guillaume Heurtier <guillaume.heurtier@maarch.org>
Date: Thu, 21 Nov 2019 18:31:24 +0100
Subject: [PATCH] FEAT #12331 TIME 0:40 migrate default action page

---
 migration/19.12/1912.sql | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/migration/19.12/1912.sql b/migration/19.12/1912.sql
index 69c9484dea4..6846a74b0c4 100644
--- a/migration/19.12/1912.sql
+++ b/migration/19.12/1912.sql
@@ -71,6 +71,17 @@ DELETE FROM actions WHERE action_page = 'view' OR component = 'viewDoc';
 ALTER TABLE groupbasket DROP COLUMN IF EXISTS list_event_data;
 ALTER TABLE groupbasket ADD COLUMN list_event_data jsonb;
 
+update groupbasket set list_event_data = '"info"', list_event = 'processDocument'
+where group_id in (
+    select group_id
+    from actions_groupbaskets
+    where id_action in (
+        select id
+        from actions
+        where action_page = 'validate_mail'
+    ) and groupbasket.basket_id = actions_groupbaskets.basket_id
+);
+
 
 /* FOLDERS */
 DO $$ BEGIN
-- 
GitLab