Set unique key index unique in db (Conform to SQL standard) and
needed for migration to other SGBD
This commit is contained in:
parent
05b359fbff
commit
be79c06c72
@ -464,3 +464,12 @@ UPDATE llx_product SET canvas = NULL where canvas = 'service@product';
|
|||||||
DELETE FROM llx_const WHERE __DECRYPT('name')__ = 'SOCIETE_CODECOMPTA_ADDON' AND __DECRYPT('value')__ = 'mod_codecompta_digitaria';
|
DELETE FROM llx_const WHERE __DECRYPT('name')__ = 'SOCIETE_CODECOMPTA_ADDON' AND __DECRYPT('value')__ = 'mod_codecompta_digitaria';
|
||||||
|
|
||||||
ALTER TABLE llx_c_barcode_type ADD UNIQUE INDEX uk_c_barcode_type(code, entity);
|
ALTER TABLE llx_c_barcode_type ADD UNIQUE INDEX uk_c_barcode_type(code, entity);
|
||||||
|
|
||||||
|
ALTER TABLE llx_c_actioncomm DROP INDEX code, ADD UNIQUE uk_c_actioncomm (code);
|
||||||
|
ALTER TABLE llx_c_civilite DROP INDEX code, ADD UNIQUE uk_c_civilite (code);
|
||||||
|
ALTER TABLE llx_c_propalst DROP INDEX code, ADD UNIQUE uk_c_propalst (code);
|
||||||
|
ALTER TABLE llx_c_stcomm DROP INDEX code, ADD UNIQUE uk_c_stcomm (code);
|
||||||
|
ALTER TABLE llx_c_type_fees DROP INDEX code, ADD UNIQUE uk_c_type_fees (code);
|
||||||
|
ALTER TABLE llx_c_typent DROP INDEX code, ADD UNIQUE uk_c_typent (code);
|
||||||
|
ALTER TABLE llx_c_effectif DROP INDEX code, ADD UNIQUE uk_c_effectif (code);
|
||||||
|
ALTER TABLE llx_c_paiement DROP INDEX code, ADD UNIQUE uk_c_paiement (code);
|
||||||
|
|||||||
@ -20,11 +20,12 @@
|
|||||||
create table llx_c_actioncomm
|
create table llx_c_actioncomm
|
||||||
(
|
(
|
||||||
id integer PRIMARY KEY,
|
id integer PRIMARY KEY,
|
||||||
code varchar(12) UNIQUE NOT NULL,
|
code varchar(12) NOT NULL,
|
||||||
type varchar(10) DEFAULT 'system' NOT NULL,
|
type varchar(10) DEFAULT 'system' NOT NULL,
|
||||||
libelle varchar(48) NOT NULL,
|
libelle varchar(48) NOT NULL,
|
||||||
module varchar(16) DEFAULT NULL,
|
module varchar(16) DEFAULT NULL,
|
||||||
active tinyint DEFAULT 1 NOT NULL,
|
active tinyint DEFAULT 1 NOT NULL,
|
||||||
todo tinyint,
|
todo tinyint,
|
||||||
position integer NOT NULL DEFAULT 0
|
position integer NOT NULL DEFAULT 0,
|
||||||
|
UNIQUE KEY uk_c_actioncomm (code)
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|||||||
@ -20,9 +20,10 @@
|
|||||||
create table llx_c_civilite
|
create table llx_c_civilite
|
||||||
(
|
(
|
||||||
rowid integer PRIMARY KEY,
|
rowid integer PRIMARY KEY,
|
||||||
code varchar(6) UNIQUE NOT NULL,
|
code varchar(6) NOT NULL,
|
||||||
civilite varchar(50),
|
civilite varchar(50),
|
||||||
active tinyint DEFAULT 1 NOT NULL,
|
active tinyint DEFAULT 1 NOT NULL,
|
||||||
module varchar(32) NULL
|
module varchar(32) NULL,
|
||||||
|
UNIQUE KEY uk_c_civilite (code)
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|
||||||
|
|||||||
@ -20,9 +20,10 @@
|
|||||||
create table llx_c_effectif
|
create table llx_c_effectif
|
||||||
(
|
(
|
||||||
id integer PRIMARY KEY,
|
id integer PRIMARY KEY,
|
||||||
code varchar(12) UNIQUE NOT NULL,
|
code varchar(12) NOT NULL,
|
||||||
libelle varchar(30),
|
libelle varchar(30),
|
||||||
active tinyint DEFAULT 1 NOT NULL,
|
active tinyint DEFAULT 1 NOT NULL,
|
||||||
module varchar(32) NULL
|
module varchar(32) NULL,
|
||||||
|
UNIQUE KEY uk_c_effectif (code)
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|
||||||
|
|||||||
@ -27,11 +27,12 @@
|
|||||||
create table llx_c_paiement
|
create table llx_c_paiement
|
||||||
(
|
(
|
||||||
id integer PRIMARY KEY,
|
id integer PRIMARY KEY,
|
||||||
code varchar(6) UNIQUE NOT NULL,
|
code varchar(6) NOT NULL,
|
||||||
libelle varchar(30),
|
libelle varchar(30),
|
||||||
type smallint,
|
type smallint,
|
||||||
active tinyint DEFAULT 1 NOT NULL,
|
active tinyint DEFAULT 1 NOT NULL,
|
||||||
module varchar(32) NULL
|
module varchar(32) NULL,
|
||||||
|
UNIQUE KEY uk_c_paiement (code)
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -20,8 +20,9 @@
|
|||||||
create table llx_c_propalst
|
create table llx_c_propalst
|
||||||
(
|
(
|
||||||
id smallint PRIMARY KEY,
|
id smallint PRIMARY KEY,
|
||||||
code varchar(12) UNIQUE NOT NULL,
|
code varchar(12) NOT NULL,
|
||||||
label varchar(30),
|
label varchar(30),
|
||||||
active tinyint DEFAULT 1 NOT NULL
|
active tinyint DEFAULT 1 NOT NULL,
|
||||||
|
UNIQUE KEY uk_c_propalst (code)
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|
||||||
|
|||||||
@ -20,8 +20,9 @@
|
|||||||
create table llx_c_stcomm
|
create table llx_c_stcomm
|
||||||
(
|
(
|
||||||
id integer PRIMARY KEY,
|
id integer PRIMARY KEY,
|
||||||
code varchar(12) UNIQUE NOT NULL,
|
code varchar(12) NOT NULL,
|
||||||
libelle varchar(30),
|
libelle varchar(30),
|
||||||
active tinyint default 1 NOT NULL
|
active tinyint default 1 NOT NULL,
|
||||||
|
UNIQUE KEY uk_c_stcomm (code)
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|
||||||
|
|||||||
@ -20,8 +20,9 @@
|
|||||||
create table llx_c_type_fees
|
create table llx_c_type_fees
|
||||||
(
|
(
|
||||||
id integer AUTO_INCREMENT PRIMARY KEY,
|
id integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
code varchar(12) UNIQUE NOT NULL,
|
code varchar(12) NOT NULL,
|
||||||
libelle varchar(30),
|
libelle varchar(30),
|
||||||
active tinyint DEFAULT 1 NOT NULL,
|
active tinyint DEFAULT 1 NOT NULL,
|
||||||
module varchar(32) NULL
|
module varchar(32) NULL,
|
||||||
|
UNIQUE KEY uk_c_type_fees (code)
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|||||||
@ -20,8 +20,9 @@
|
|||||||
create table llx_c_typent
|
create table llx_c_typent
|
||||||
(
|
(
|
||||||
id integer PRIMARY KEY,
|
id integer PRIMARY KEY,
|
||||||
code varchar(12) UNIQUE NOT NULL,
|
code varchar(12) NOT NULL,
|
||||||
libelle varchar(30),
|
libelle varchar(30),
|
||||||
active tinyint DEFAULT 1 NOT NULL,
|
active tinyint DEFAULT 1 NOT NULL,
|
||||||
module varchar(32) NULL
|
module varchar(32) NULL,
|
||||||
|
UNIQUE KEY uk_c_typent (code)
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user