noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 88/107: SQL : correct SQL script to take care


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 88/107: SQL : correct SQL script to take care of users who delete the profile no 2
Date: Mon, 26 Aug 2019 10:32:07 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 9fe4f7ae434893f0a54c2640fdd06152086b22f3
Author: Dany De Bontridder <address@hidden>
Date:   Mon Aug 19 12:04:43 2019 +0200

    SQL : correct SQL script to take care of users who
    delete the profile no 2
---
 include/sql/patch/upgrade135.sql | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/sql/patch/upgrade135.sql b/include/sql/patch/upgrade135.sql
index e45fa03..5b57918 100644
--- a/include/sql/patch/upgrade135.sql
+++ b/include/sql/patch/upgrade135.sql
@@ -8,16 +8,16 @@ select me_code,'PRINT',1,250,'E',0,6 from menu_ref where 
me_code='PRINTTVA'
 union
 select me_code,'PRINT',1,250,'E',0,35 from menu_ref where me_code='PRINTTVA'
 union
-select me_code,'PRINT',2,250,'E',0,719 from menu_ref where me_code='PRINTTVA'
+select me_code,'PRINT',2,250,'E',0,719 from menu_ref where me_code='PRINTTVA' 
and exists (select 1 from profile where p_id=2)
 union
-select me_code,'PRINT',2,250,'E',0,716 from menu_ref where me_code='PRINTTVA'
+select me_code,'PRINT',2,250,'E',0,716 from menu_ref where me_code='PRINTTVA' 
and exists (select 1 from profile where p_id=2)
 ;
 insert into menu_ref (me_code,me_menu,me_file,me_type)
 values ('CSV:printtva','Export Résumé TVA','export_printtva_csv.php','PR'),
        ('PDF:printtva','Export Résumé TVA','export_printtva_pdf.php','PR')
 ;
 
-insert into profile_menu(me_code,p_id,p_type_display) values 
('CSV:printtva',1,'P'),('PDF:printtva',1,'P'),('CSV:printtva',2,'P'),('PDF:printtva',2,'P');
+insert into profile_menu(me_code,p_id,p_type_display) select 
'CSV:printtva',p_id,'P' from profile where p_id in (1,2) union all select 
'PDF:printtva',p_id,'P' from profile where p_id in (1,2);
 
 insert into version (val,v_description) values (136,'new feature PRINTTVA');
 commit ;
\ No newline at end of file



reply via email to

[Prev in Thread] Current Thread [Next in Thread]