[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 38/38: Upgrade SQL
From: |
dwm |
Subject: |
[Noalyss-commit] [noalyss] 38/38: Upgrade SQL |
Date: |
Sun, 18 Feb 2024 07:30:49 -0500 (EST) |
sparkyx pushed a commit to branch devel
in repository noalyss.
commit 910ae8b9f279943b3f267eac6cba50d8f42d62f9
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sun Feb 18 13:24:19 2024 +0100
Upgrade SQL
---
include/constant.php | 2 +-
.../sql/patch/upgrade194.sql | 11 +++++++--
sql/reverse.sql | 9 -------
sql/upgrade.sql | 28 ----------------------
4 files changed, 10 insertions(+), 40 deletions(-)
diff --git a/include/constant.php b/include/constant.php
index ed6d1201b..cc2868b6d 100644
--- a/include/constant.php
+++ b/include/constant.php
@@ -123,7 +123,7 @@ if (!defined("NOALYSS_PACKAGE_REPOSITORY")) {
if (!defined("SYSINFO_DISPLAY")) {
define("SYSINFO_DISPLAY", TRUE);
}
-define("DBVERSION", 194);
+define("DBVERSION", 195);
define("MONO_DATABASE", 25);
define("DBVERSIONREPO", 20);
define('NOTFOUND', '--not found--');
diff --git a/sql/upgrade.sql b/include/sql/patch/upgrade194.sql
similarity index 87%
copy from sql/upgrade.sql
copy to include/sql/patch/upgrade194.sql
index a535f78b4..29c98388e 100644
--- a/sql/upgrade.sql
+++ b/include/sql/patch/upgrade194.sql
@@ -1,3 +1,6 @@
+begin;
+
+
CREATE OR REPLACE FUNCTION comptaproc.trg_remove_script_tag()
RETURNS trigger
LANGUAGE plpgsql
@@ -9,8 +12,7 @@ begin
return NEW;
end;
-$function$
-;
+$function$;
create trigger t_remove_script_tag before
@@ -26,3 +28,8 @@ INSERT INTO public.menu_ref
(me_code,me_menu,me_file,me_url,me_description,me_pa
insert into public.profile_menu (me_code,p_id,p_type_display) select
'PDF:card',p_id,'P' from profile;
create table action_gestion_filter(af_id bigint generated always as identity,
af_user text not null, af_name text not null , af_search text not null);
+
+
+
+insert into version (val,v_description) values (195,'Protect injection JS ,
sauve recherche suivi');
+commit;
\ No newline at end of file
diff --git a/sql/reverse.sql b/sql/reverse.sql
index bd4c93f72..8b1378917 100644
--- a/sql/reverse.sql
+++ b/sql/reverse.sql
@@ -1,10 +1 @@
-drop trigger t_remove_script_tag on public.action_gestion_comment ;
-drop FUNCTION comptaproc.trg_remove_script_tag();
-
-delete from profile_menu where me_code='PDF:card';
-delete from public.menu_ref where me_code='PDF:card';
-
-
-
-drop table action_gestion_filter;
diff --git a/sql/upgrade.sql b/sql/upgrade.sql
index a535f78b4..e69de29bb 100644
--- a/sql/upgrade.sql
+++ b/sql/upgrade.sql
@@ -1,28 +0,0 @@
-CREATE OR REPLACE FUNCTION comptaproc.trg_remove_script_tag()
- RETURNS trigger
- LANGUAGE plpgsql
-AS $function$
-
-begin
-
- NEW.agc_comment_raw:= regexp_replace(NEW.agc_comment_raw, '<script',
'scritp', 'i');
- return NEW;
-
-end;
-$function$
-;
-
-
-create trigger t_remove_script_tag before
- insert
- or
- update
- on
- public.action_gestion_comment for each row execute function
comptaproc.trg_remove_script_tag();
-
-INSERT INTO public.menu_ref
(me_code,me_menu,me_file,me_url,me_description,me_parameter,me_javascript,me_type,me_description_etendue)
VALUES
- ('PDF:card','export Fiche détail
PDF','export_card_pdf.php',NULL,NULL,NULL,NULL,'PR',NULL);
-
-insert into public.profile_menu (me_code,p_id,p_type_display) select
'PDF:card',p_id,'P' from profile;
-
-create table action_gestion_filter(af_id bigint generated always as identity,
af_user text not null, af_name text not null , af_search text not null);
- [Noalyss-commit] [noalyss] 31/38: DB protect against JS Injection, (continued)
- [Noalyss-commit] [noalyss] 31/38: DB protect against JS Injection, dwm, 2024/02/18
- [Noalyss-commit] [noalyss] 24/38: Nouveau #00022980002298: detail fiche , historique du suivi, dwm, 2024/02/18
- [Noalyss-commit] [noalyss] 35/38: Merge devel, dwm, 2024/02/18
- [Noalyss-commit] [noalyss] 09/38: Task #2321: Sécurité : empêcher changement de numéro de pièce, dwm, 2024/02/18
- [Noalyss-commit] [noalyss] 16/38: Follow-Up : bug ne peut pas ajouter fichier sur nouvel événement, dwm, 2024/02/18
- [Noalyss-commit] [noalyss] 18/38: Fix cosmetic bug : duplicate operation with autoreverse VAT has an VAT amount, dwm, 2024/02/18
- [Noalyss-commit] [noalyss] 20/38: Fix : auto numbering receipt, dwm, 2024/02/18
- [Noalyss-commit] [noalyss] 21/38: Merge branch 'devel', dwm, 2024/02/18
- [Noalyss-commit] [noalyss] 25/38: cosmetic, dwm, 2024/02/18
- [Noalyss-commit] [noalyss] 37/38: Cosmetic, dwm, 2024/02/18
- [Noalyss-commit] [noalyss] 38/38: Upgrade SQL,
dwm <=
- [Noalyss-commit] [noalyss] 28/38: DB protect against JS Injection, dwm, 2024/02/18
- [Noalyss-commit] [noalyss] 07/38: SUIVI : ajout prénom, dwm, 2024/02/18
- [Noalyss-commit] [noalyss] 14/38: integre changement SQL, dwm, 2024/02/18
- [Noalyss-commit] [noalyss] 30/38: redirect via javascript, dwm, 2024/02/18
- [Noalyss-commit] [noalyss] 34/38: Gestion : possibilité de sauvegarder les recherches, dwm, 2024/02/18