From 69f15db4e942c28ebfdf33fa1aa5451b7d75f576 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Thu, 20 Jun 2019 09:37:23 +0200 Subject: [PATCH] Fix migration - Move to v11 --- .../install/mysql/migration/10.0.0-11.0.0.sql | 20 ++++++++++++++++++ .../install/mysql/migration/9.0.0-10.0.0.sql | 21 +------------------ 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql index 018892d7a2c..51446573c85 100644 --- a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql +++ b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql @@ -32,6 +32,26 @@ -- For 11.0 +-- Intracomm Report +CREATE TABLE llx_c_transport_mode ( + rowid integer AUTO_INCREMENT PRIMARY KEY, + code varchar(3) NOT NULL, + label varchar(255) NOT NULL, + active tinyint DEFAULT 1 NOT NULL +) ENGINE=innodb; + +INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('MAR', 'Transport maritime (y compris camions ou wagons sur bateau)', 1); +INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('TRA', 'Transport par chemin de fer (y compris camions sur wagon)', 1); +INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('ROU', 'Transport par route', 1); +INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('AIR', 'Transport par air', 1); +INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('POS', 'Envois postaux', 1); +INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('OLE', 'Installations de transport fixe (oléoduc)', 1); +INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('NAV', 'Transport par navigation intérieure', 1); +INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('PRO', 'Propulsion propre', 1); + +ALTER TABLE llx_facture ADD COLUMN fk_mode_transport integer after location_incoterms; +ALTER TABLE llx_facture_fourn ADD COLUMN fk_mode_transport integer after location_incoterms; + CREATE TABLE llx_intracommreport ( rowid integer AUTO_INCREMENT PRIMARY KEY, diff --git a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql index 83a0b1bb7c6..2a841834735 100644 --- a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql +++ b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql @@ -391,23 +391,4 @@ insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) v insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (112, 'supplier_proposal', 'external', 'SHIPPING', 'Contact fournisseur livraison', 1); insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (113, 'supplier_proposal', 'external', 'SERVICE', 'Contact fournisseur prestation', 1); -ALTER TABLE llx_ticket_extrafields ADD INDEX idx_ticket_extrafields (fk_object); - -CREATE TABLE llx_c_transport_mode ( - rowid integer AUTO_INCREMENT PRIMARY KEY, - code varchar(3) NOT NULL, - libelle varchar(255) NOT NULL, - active tinyint DEFAULT 1 NOT NULL -) ENGINE=innodb; - -INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('MAR', 'Transport maritime (y compris camions ou wagons sur bateau)', 1); -INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('TRA', 'Transport par chemin de fer (y compris camions sur wagon)', 1); -INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('ROU', 'Transport par route', 1); -INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('AIR', 'Transport par air', 1); -INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('POS', 'Envois postaux', 1); -INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('OLE', 'Installations de transport fixe (oléoduc)', 1); -INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('NAV', 'Transport par navigation intérieure', 1); -INSERT INTO llx_c_transport_mode (code, libelle, active) VALUES ('PRO', 'Propulsion propre', 1); - -ALTER TABLE llx_facture ADD COLUMN fk_mode_transport integer after location_incoterms; -ALTER TABLE llx_facture_fourn ADD COLUMN fk_mode_transport integer after location_incoterms; +ALTER TABLE llx_ticket_extrafields ADD INDEX idx_ticket_extrafields (fk_object); \ No newline at end of file