From dfc79b6a296a61272c6f9ed8d1a6b5f141d15404 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Mon, 26 Aug 2019 15:09:45 +0200 Subject: [PATCH] =?UTF-8?q?Fix=200001728:=20Aide=20=C3=A0=20l'encodage=20-?= =?UTF-8?q?=20Journaux=20n=C3=A9gatifs=20(note=20de=20cr=C3=A9dit)=20SQL?= =?UTF-8?q?=20Scripts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/constant.php | 2 +- include/sql/patch/upgrade136.sql | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 include/sql/patch/upgrade136.sql diff --git a/include/constant.php b/include/constant.php index 81911ffb5..d157706d8 100644 --- a/include/constant.php +++ b/include/constant.php @@ -108,7 +108,7 @@ if ( !defined ("NOALYSS_PACKAGE_REPOSITORY")) { if ( ! defined ("SYSINFO_DISPLAY")) { define ("SYSINFO_DISPLAY",TRUE); } -define ("DBVERSION",136); +define ("DBVERSION",137); define ("MONO_DATABASE",25); define ("DBVERSIONREPO",18); define ('NOTFOUND','--not found--'); diff --git a/include/sql/patch/upgrade136.sql b/include/sql/patch/upgrade136.sql new file mode 100644 index 000000000..c74314ef4 --- /dev/null +++ b/include/sql/patch/upgrade136.sql @@ -0,0 +1,15 @@ +begin; + +alter table jrn_def add column jrn_def_negative_amount char(1) default '0'; +update jrn_def set jrn_def_negative_amount = '0'; +alter table jrn_def add constraint negative_amount_ck check (jrn_def_negative_amount in ('1','0')); +alter table jrn_def alter jrn_def_negative_amount set not null; +comment on column jrn_def.jrn_def_negative_amount is '1 echo a warning if you are not using an negative amount, default 0 for no warning'; +alter table jrn_def add column jrn_def_negative_warning text; +update jrn_def set jrn_def_negative_warning = 'Attention, ce journal doit utiliser des montants négatifs'; +comment on column jrn_def.jrn_def_negative_warning is 'Yell a warning if the amount if not negative , in the case of jrn_def_negative_amount is Y'; + + + +insert into version (val,v_description) values (137,'Ledger warning'); +commit ; \ No newline at end of file