Merge pull request #18190 from frederic34/migration_cat_tickets

add categories tickets migration
This commit is contained in:
Laurent Destailleur 2021-08-03 17:13:06 +02:00 committed by GitHub
commit 78358d4ea1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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

@ -35,6 +35,19 @@
-- 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);
ALTER TABLE llx_product_fournisseur_price MODIFY COLUMN ref_fourn varchar(128); ALTER TABLE llx_product_fournisseur_price MODIFY COLUMN ref_fourn varchar(128);
ALTER TABLE llx_product_customer_price MODIFY COLUMN ref_customer varchar(128); ALTER TABLE llx_product_customer_price MODIFY COLUMN ref_customer varchar(128);