Fix sql migration

This commit is contained in:
Laurent Destailleur 2022-05-08 17:39:53 +02:00
parent 177f3f9ca4
commit 65eb11efdf

View File

@ -519,6 +519,9 @@ CREATE TABLE llx_element_tag
import_key varchar(14)
)ENGINE=innodb;
ALTER TABLE llx_element_tag ADD COLUMN fk_categorie integer;
ALTER TABLE llx_element_tag ADD COLUMN fk_element integer;
ALTER TABLE llx_element_tag ADD UNIQUE INDEX idx_element_tag_uk (fk_categorie, fk_element);
ALTER TABLE llx_element_tag ADD CONSTRAINT fk_element_tag_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);