Skip to content

Commit 521d11b

Browse files
author
Carlos Lizaga
committed
Add indexes to timestamp field in oauth_nonce
Syntax control
1 parent d0b82cc commit 521d11b

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

app/code/Magento/Integration/Setup/UpgradeSchema.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,16 @@ public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $con
7171
$setup->getConnection()->createTable($table);
7272
}
7373

74+
if (version_compare($context->getVersion(), '2.2.1', '<')) {
75+
$connection = $setup->getConnection();
76+
77+
$connection->addIndex(
78+
$setup->getTable('oauth_nonce'),
79+
$setup->getIdxName('oauth_nonce', ['timestamp']),
80+
['timestamp']
81+
);
82+
}
83+
7484
$setup->endSetup();
7585
}
7686
}

app/code/Magento/Integration/etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
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_Integration" setup_version="2.2.0">
9+
<module name="Magento_Integration" setup_version="2.2.1">
1010
<sequence>
1111
<module name="Magento_Store"/>
1212
<module name="Magento_User"/>

0 commit comments

Comments
 (0)