File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
3
* Append Missing foreign key to catalog_product_entity on search terms product positions
4
+ * Also delete useless indexes previously created
4
5
*
5
6
* DISCLAIMER
6
7
*
20
21
21
22
$ tableName = $ installer ->getTable ('smile_elasticsearch/search_term_product_position ' );
22
23
24
+ $ installer ->getConnection ()->dropIndex (
25
+ $ tableName ,
26
+ $ installer ->getIdxName ('smile_elasticsearch/search_term_product_position ' , array ('query_id ' ))
27
+ );
28
+
29
+ $ installer ->getConnection ()->dropIndex (
30
+ $ tableName ,
31
+ $ installer ->getIdxName ('smile_elasticsearch/search_term_product_position ' , array ('product_id ' ))
32
+ );
33
+
23
34
$ installer ->getConnection ()->addForeignKey (
24
35
$ installer ->getFkName (
25
36
'smile_elasticsearch/search_term_product_position ' ,
Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
3
* Append Missing foreign key to catalog_product_entity on virtual categories product positions
4
+ * Also delete useless indexes previously created
4
5
*
5
6
* DISCLAIMER
6
7
*
20
21
21
22
$ tableName = $ installer ->getTable ('smile_virtualcategories/category_product_position ' );
22
23
24
+ $ installer ->getConnection ()->dropIndex (
25
+ $ tableName ,
26
+ $ installer ->getIdxName ('smile_virtualcategories/category_product_position ' , array ('category_id ' ))
27
+ );
28
+
29
+ $ installer ->getConnection ()->dropIndex (
30
+ $ tableName ,
31
+ $ installer ->getIdxName ('smile_virtualcategories/category_product_position ' , array ('product_id ' ))
32
+ );
33
+
23
34
$ installer ->getConnection ()->addForeignKey (
24
35
$ installer ->getFkName (
25
36
'smile_virtualcategories/category_product_position ' ,
You can’t perform that action at this time.
0 commit comments