add categories tickets migration

This commit is contained in:
Frédéric FRANCE 2021-07-21 08:40:07 +02:00
parent c0d54fe608
commit f2dc3be051
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
2 changed files with 36 additions and 21 deletions

View File

@ -411,7 +411,8 @@ if (!file_exists($conffile)) {
if (GETPOST('allowupgrade')) { if (GETPOST('allowupgrade')) {
$allowupgrade = true; $allowupgrade = true;
} }
$migrationscript = array(array('from'=>'3.0.0', 'to'=>'3.1.0'), $migrationscript = array(
array('from'=>'3.0.0', 'to'=>'3.1.0'),
array('from'=>'3.1.0', 'to'=>'3.2.0'), array('from'=>'3.1.0', 'to'=>'3.2.0'),
array('from'=>'3.2.0', 'to'=>'3.3.0'), array('from'=>'3.2.0', 'to'=>'3.3.0'),
array('from'=>'3.3.0', 'to'=>'3.4.0'), array('from'=>'3.3.0', 'to'=>'3.4.0'),
@ -430,7 +431,8 @@ if (!file_exists($conffile)) {
array('from'=>'10.0.0', 'to'=>'11.0.0'), array('from'=>'10.0.0', 'to'=>'11.0.0'),
array('from'=>'11.0.0', 'to'=>'12.0.0'), array('from'=>'11.0.0', 'to'=>'12.0.0'),
array('from'=>'12.0.0', 'to'=>'13.0.0'), array('from'=>'12.0.0', 'to'=>'13.0.0'),
array('from'=>'13.0.0', 'to'=>'14.0.0') array('from'=>'13.0.0', 'to'=>'14.0.0'),
array('from'=>'14.0.0', 'to'=>'15.0.0'),
); );
$count = 0; $count = 0;

View File

@ -37,3 +37,16 @@
-- v15 -- v15
CREATE TABLE llx_categorie_ticket
(
fk_categorie integer NOT NULL,
fk_ticket integer NOT NULL,
import_key varchar(14)
) ENGINE=innodb;
ALTER TABLE llx_categorie_ticket ADD PRIMARY KEY pk_categorie_ticket (fk_categorie, fk_ticket);
ALTER TABLE llx_categorie_ticket ADD INDEX idx_categorie_ticket_fk_categorie (fk_categorie);
ALTER TABLE llx_categorie_ticket ADD INDEX idx_categorie_ticket_fk_ticket (fk_ticket);
ALTER TABLE llx_categorie_ticket ADD CONSTRAINT fk_categorie_ticket_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);
ALTER TABLE llx_categorie_ticket ADD CONSTRAINT fk_categorie_ticket_ticket_rowid FOREIGN KEY (fk_ticket) REFERENCES llx_ticket (rowid);