add entity in c_productbatch_qcstatus key

This commit is contained in:
altairis-noe 2021-04-29 13:00:47 +02:00
parent 762f41ea86
commit f7182d43fd
4 changed files with 7 additions and 5 deletions

View File

@ -23,6 +23,6 @@
-- de l'install et tous les sigles '--' sont supprimés. -- de l'install et tous les sigles '--' sont supprimés.
-- --
INSERT INTO llx_c_productbatch_status (code, label, active) VALUES ('OK', 'InWorkingOrder', 1); INSERT INTO llx_c_productbatch_qcstatus (code, label, active) VALUES ('OK', 'InWorkingOrder', 1);
INSERT INTO llx_c_productbatch_status (code, label, active) VALUES ('KO', 'OutOfOrder', 1); INSERT INTO llx_c_productbatch_qcstatus (code, label, active) VALUES ('KO', 'OutOfOrder', 1);

View File

@ -143,12 +143,13 @@ CREATE TABLE llx_workstation_workstation_usergroup(
CREATE TABLE llx_c_producbatch_qcstatus( CREATE TABLE llx_c_producbatch_qcstatus(
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
entity integer NOT NULL DEFAULT 1,
code varchar(16) NOT NULL, code varchar(16) NOT NULL,
label varchar(50) NOT NULL, label varchar(50) NOT NULL,
active integer DEFAULT 1 NOT NULL active integer DEFAULT 1 NOT NULL
) ENGINE=innodb; ) ENGINE=innodb;
ALTER TABLE llx_c_productbatch_qcstatus ADD UNIQUE INDEX uk_c_productbatch_qcstatus(code); ALTER TABLE llx_c_productbatch_qcstatus ADD UNIQUE INDEX uk_c_productbatch_qcstatus(code, entity);
INSERT INTO llx_c_productbatch_qcstatus (code, label, active) VALUES ('OK', 'InWorkingOrder', 1); INSERT INTO llx_c_productbatch_qcstatus (code, label, active) VALUES ('OK', 'InWorkingOrder', 1);
INSERT INTO llx_c_productbatch_qcstatus (code, label, active) VALUES ('KO', 'OutOfOrder', 1); INSERT INTO llx_c_productbatch_qcstatus (code, label, active) VALUES ('KO', 'OutOfOrder', 1);

View File

@ -16,4 +16,4 @@
-- --
-- ======================================================================== -- ========================================================================
ALTER TABLE llx_c_productbatch_qcstatus ADD UNIQUE INDEX uk_c_productbatch_qcstatus(code); ALTER TABLE llx_c_productbatch_qcstatus ADD UNIQUE INDEX uk_c_productbatch_qcstatus(code, entity);

View File

@ -16,9 +16,10 @@
-- --
-- ======================================================================== -- ========================================================================
create table llx_c_productbatch_qcstatus CREATE TABLE llx_c_productbatch_qcstatus
( (
rowid integer AUTO_INCREMENT PRIMARY KEY, rowid integer AUTO_INCREMENT PRIMARY KEY,
entity integer NOT NULL DEFAULT 1,
code varchar(16) NOT NULL, code varchar(16) NOT NULL,
label varchar(50) NOT NULL, label varchar(50) NOT NULL,
active integer DEFAULT 1 NOT NULL active integer DEFAULT 1 NOT NULL