[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 16/30: Fix bug : prevent identical tags on op
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 16/30: Fix bug : prevent identical tags on operation |
Date: |
Sat, 3 Dec 2022 08:35:10 -0500 (EST) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit f124cff25f45773ba7d8aa6b22963bbfeb08659a
Author: Eric <eric@noalyss.eu>
AuthorDate: Fri Nov 25 15:41:03 2022 +0100
Fix bug : prevent identical tags on operation
---
include/constant.php | 2 +-
include/sql/patch/upgrade181.sql | 11 +++++++++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/include/constant.php b/include/constant.php
index 4353f3926..73d32fdd3 100644
--- a/include/constant.php
+++ b/include/constant.php
@@ -116,7 +116,7 @@ if (!defined("NOALYSS_PACKAGE_REPOSITORY")) {
if (!defined("SYSINFO_DISPLAY")) {
define("SYSINFO_DISPLAY", TRUE);
}
-define("DBVERSION", 180);
+define("DBVERSION", 181);
define("MONO_DATABASE", 25);
define("DBVERSIONREPO", 20);
define('NOTFOUND', '--not found--');
diff --git a/include/sql/patch/upgrade181.sql b/include/sql/patch/upgrade181.sql
new file mode 100644
index 000000000..137335a52
--- /dev/null
+++ b/include/sql/patch/upgrade181.sql
@@ -0,0 +1,11 @@
+begin;
+
+
+-- create constraint
+alter table operation_tag add constraint tag_operation_uq unique
(jrn_id,tag_id);
+
+-- remove duplicate
+delete from operation_tag where opt_id in (select a.opt_id from operation_tag
a join operation_tag b on (a.jrn_id=b.jrn_id and a.tag_id=b.tag_id) where
a.opt_id < b.opt_id );
+
+insert into version (val,v_description) values (182,'Prevent to add several
time same tag on an operation');
+commit;
\ No newline at end of file
- [Noalyss-commit] [noalyss] 01/30: Bug : no filter on card for ledger PURCHASE, (continued)
- [Noalyss-commit] [noalyss] 01/30: Bug : no filter on card for ledger PURCHASE, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 05/30: Cosmetic : display cards on one row in account search, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 11/30: Improve Test and set the Patch level to 181, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 13/30: Better error message when cannot save a plugin, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 12/30: Fix : bug cannot save an empty FIN Ledger, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 14/30: Bug Fiche_Def->insertAttribut when needed to compute an attribute order, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 26/30: WHen creating from follow-up , keep a link to the event in the operation, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 24/30: Cosmetic, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 23/30: Comptability : Falkon doesn't understand the javascript token "??", Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 10/30: Bug : typo change by accident function name, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 16/30: Fix bug : prevent identical tags on operation,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 21/30: Change DB version, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 20/30: fix bug followup cannot add first comment, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 22/30: cosmetic : waiting_box, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 15/30: Cosmetic :, Dany De Bontridder, 2022/12/03