File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed
app/code/Magento/Newsletter Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * Copyright © Magento, Inc. All rights reserved.
4+ * See COPYING.txt for license details.
5+ */
6+ namespace Magento \Newsletter \Setup ;
7+
8+ use Magento \Framework \Setup \ModuleContextInterface ;
9+ use Magento \Framework \Setup \SchemaSetupInterface ;
10+ use Magento \Framework \Setup \UpgradeSchemaInterface ;
11+
12+ /**
13+ * Upgrade the Newsletter module DB scheme
14+ */
15+ class UpgradeSchema implements UpgradeSchemaInterface
16+ {
17+ /**
18+ * {@inheritdoc}
19+ */
20+ public function upgrade (SchemaSetupInterface $ setup , ModuleContextInterface $ context )
21+ {
22+ $ setup ->startSetup ();
23+
24+ if (version_compare ($ context ->getVersion (), '2.0.1 ' , '< ' )) {
25+ $ connection = $ setup ->getConnection ();
26+
27+ $ connection ->addIndex (
28+ $ setup ->getTable ('newsletter_subscriber ' ),
29+ $ setup ->getIdxName ('newsletter_subscriber ' , ['subscriber_email ' ]),
30+ ['subscriber_email ' ]
31+ );
32+ }
33+
34+ $ setup ->endSetup ();
35+ }
36+ }
Original file line number Diff line number Diff line change 66 */
77-->
88<config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:framework:Module/etc/module.xsd" >
9- <module name =" Magento_Newsletter" setup_version =" 2.0.0 " >
9+ <module name =" Magento_Newsletter" setup_version =" 2.0.1 " >
1010 <sequence >
1111 <module name =" Magento_Store" />
1212 <module name =" Magento_Customer" />
You can’t perform that action at this time.
0 commit comments