diff --git a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql
index e9bbe12564419..25920fcbd0dba 100644
--- a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql
+++ b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql
@@ -189,6 +189,13 @@ CREATE TABLE llx_payment_salary (
fk_user_modif integer
)ENGINE=innodb;
+ALTER TABLE llx_product_batch ADD INDEX idx_fk_product_stock (fk_product_stock);
+ALTER TABLE llx_product_batch ADD CONSTRAINT fk_product_batch_fk_product_stock FOREIGN KEY (fk_product_stock) REFERENCES llx_product_stock (rowid);
+
+ALTER TABLE llx_expeditiondet_batch ADD INDEX idx_fk_expeditiondet (fk_expeditiondet);
+ALTER TABLE llx_expeditiondet_batch ADD CONSTRAINT fk_expeditiondet_batch_fk_expeditiondet FOREIGN KEY (fk_expeditiondet) REFERENCES llx_expeditiondet(rowid);
+
+
ALTER TABLE llx_product_batch ADD INDEX ix_fk_product_stock (fk_product_stock);
ALTER TABLE llx_product_batch ADD CONSTRAINT fk_product_batch_fk_product_stock FOREIGN KEY (fk_product_stock) REFERENCES llx_product_stock (rowid);
@@ -1674,4 +1681,4 @@ INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype,
-- Fix: Missing instruction not correctly done into 3.5
-- VPGSQL8.2 ALTER TABLE llx_facture_fourn ALTER fk_mode_reglement DROP NOT NULL;
-- VPGSQL8.2 ALTER TABLE llx_facture_fourn ALTER fk_cond_reglement DROP NOT NULL;
-
\ No newline at end of file
+
diff --git a/htdocs/install/mysql/tables/llx_expeditiondet_batch.key.sql b/htdocs/install/mysql/tables/llx_expeditiondet_batch.key.sql
index f0438b6316c64..70bfe974f34ea 100644
--- a/htdocs/install/mysql/tables/llx_expeditiondet_batch.key.sql
+++ b/htdocs/install/mysql/tables/llx_expeditiondet_batch.key.sql
@@ -15,5 +15,6 @@
-- along with this program. If not, see .
--
-- ============================================================================
-ALTER TABLE llx_expeditiondet_batch ADD INDEX ix_fk_expeditiondet (fk_expeditiondet);
+
+ALTER TABLE llx_expeditiondet_batch ADD INDEX idx_fk_expeditiondet (fk_expeditiondet);
ALTER TABLE llx_expeditiondet_batch ADD CONSTRAINT fk_expeditiondet_batch_fk_expeditiondet FOREIGN KEY (fk_expeditiondet) REFERENCES llx_expeditiondet(rowid);
diff --git a/htdocs/install/mysql/tables/llx_product_batch.key.sql b/htdocs/install/mysql/tables/llx_product_batch.key.sql
index 7057d872df43a..f1f24c8b81a7a 100644
--- a/htdocs/install/mysql/tables/llx_product_batch.key.sql
+++ b/htdocs/install/mysql/tables/llx_product_batch.key.sql
@@ -15,5 +15,6 @@
-- along with this program. If not, see .
--
-- ============================================================================
-ALTER TABLE llx_product_batch ADD INDEX ix_fk_product_stock (fk_product_stock);
+
+ALTER TABLE llx_product_batch ADD INDEX idx_fk_product_stock (fk_product_stock);
ALTER TABLE llx_product_batch ADD CONSTRAINT fk_product_batch_fk_product_stock FOREIGN KEY (fk_product_stock) REFERENCES llx_product_stock (rowid);