File tree Expand file tree Collapse file tree 2 files changed +42
-1
lines changed Expand file tree Collapse file tree 2 files changed +42
-1
lines changed Original file line number Diff line number Diff line change 22
22
<config >
23
23
<modules >
24
24
<Mage_Sales >
25
- <version >1.6.0.10 </version >
25
+ <version >1.6.0.11 </version >
26
26
</Mage_Sales >
27
27
</modules >
28
28
<global >
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * OpenMage
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * https://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magento.com so we can send you a copy immediately.
14
+ *
15
+ * @category Mage
16
+ * @package Mage_Sales
17
+ * @copyright Copyright (c) 2006-2020 Magento, Inc. (http://www.magento.com)
18
+ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+
21
+ /** @var Mage_Sales_Model_Entity_Setup $installer */
22
+ $ installer = $ this ;
23
+ $ installer ->startSetup ();
24
+
25
+ // Add index to sales_flat_order on customer_email for fast lookup, only first 15 bytes
26
+ $ keyList = $ installer ->getConnection ()->getIndexList ($ installer ->getTable ('sales/order ' ));
27
+ if (!isset ($ keyList ['IDX_SALES_FLAT_ORDER_CUSTOMER_EMAIL ' ])) {
28
+ $ installer ->run ("
29
+ ALTER TABLE {$ installer ->getTable ('sales/order ' )}
30
+ ADD INDEX `IDX_SALES_FLAT_ORDER_CUSTOMER_EMAIL` (`customer_email` (15));
31
+ " );
32
+ }
33
+
34
+ // Add index to sales_flat_order_item.product_id for fast join/lookup
35
+ $ this ->getConnection ()->addIndex (
36
+ $ installer ->getTable ('sales/order_item ' ),
37
+ 'IDX_SALES_FLAT_ORDER_ITEM_PRODUCT_ID ' ,
38
+ ['product_id ' ]
39
+ );
40
+
41
+ $ installer ->endSetup ();
You can’t perform that action at this time.
0 commit comments