Fix bug : prevent identical tags on operation
This commit is contained in:
parent
c9c245ee7e
commit
f124cff25f
2 changed files with 12 additions and 1 deletions
|
|
@ -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--');
|
||||
|
|
|
|||
11
include/sql/patch/upgrade181.sql
Normal file
11
include/sql/patch/upgrade181.sql
Normal file
|
|
@ -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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue