Skip to content

Commit

Permalink
Merge pull request #426 from akeneo/release/v101.8.1
Browse files Browse the repository at this point in the history
release/v101.8.1 into master
  • Loading branch information
Dnd-Gimix authored Aug 31, 2021
2 parents de47606 + 0b6cdb7 commit c6a6767
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,3 +242,8 @@
### Version 101.8.0 :
* Add configurations to choose which cache to flush after each job (https://help.akeneo.com/magento2-connector/articles/16-configure-cache-flush.html)
* Add configurations to choose which index to refresh after each job (https://help.akeneo.com/magento2-connector/articles/15-configure-index-refresh.html)

### Version 101.8.1 :
* Add index to "code" column in every job temporary tables
* Add index to "identifier" column in product job temporary table
* Add index to "attribute" column in option job temporary table
4 changes: 4 additions & 0 deletions Helper/Import/Entities.php
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,10 @@ public function matchEntity($pimKey, $entityTable, $entityKey, $import, $prefix
/** @var string $tableName */
$tableName = $this->getTableName($import);

/** @var string $codeIndexName */
$codeIndexName = $connection->getIndexName($tableName, 'code');
$connection->query('CREATE INDEX ' . $codeIndexName . ' ON ' . $tableName . ' (code(255));');

$connection->delete($tableName, [$pimKey . ' = ?' => '']);
/** @var string $akeneoConnectorTable */
$akeneoConnectorTable = $this->getTable('akeneo_connector_entities');
Expand Down
8 changes: 8 additions & 0 deletions Helper/Import/Option.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ public function matchEntity($pimKey, $entityTable, $entityKey, $import, $prefix
/** @var string $tableName */
$tableName = $this->getTableName($import);

/** @var string $codeIndexName */
$codeIndexName = $connection->getIndexName($tableName, 'code');
$connection->query('CREATE INDEX ' . $codeIndexName . ' ON ' . $tableName . ' (code(255));');

/** @var string $attributeIndexName */
$attributeIndexName = $connection->getIndexName($tableName, 'attribute');
$connection->query('CREATE INDEX ' . $attributeIndexName . ' ON ' . $tableName . ' (attribute(255));');

$connection->delete($tableName, [$pimKey . ' = ?' => '']);
/** @var string $akeneoConnectorTable */
$akeneoConnectorTable = $this->getTable('akeneo_connector_entities');
Expand Down
4 changes: 4 additions & 0 deletions Helper/Import/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,10 @@ public function matchEntity($pimKey, $entityTable, $entityKey, $import, $prefix
/** @var string $tableName */
$tableName = $this->getTableName($import);

/** @var string $codeIndexName */
$codeIndexName = $connection->getIndexName($tableName, 'code');
$connection->query('CREATE INDEX ' . $codeIndexName . ' ON ' . $tableName . ' (code(255));');

$connection->delete($tableName, [$pimKey . ' = ?' => '']);
/** @var string $akeneoConnectorTable */
$akeneoConnectorTable = $this->getTable('akeneo_connector_entities');
Expand Down
4 changes: 4 additions & 0 deletions Job/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -1226,6 +1226,10 @@ public function matchEntities()
/** @var string $tmpTable */
$tmpTable = $this->entitiesHelper->getTableName($this->getCode());

/** @var string $identifierIndexName */
$identifierIndexName = $connection->getIndexName($tmpTable, 'identifier');
$connection->query('CREATE INDEX ' . $identifierIndexName . ' ON ' . $tmpTable . ' (identifier(255));');

/** @var array $duplicates */
$duplicates = $connection->fetchCol(
$connection->select()->from($tmpTable, ['identifier'])->group('identifier')->having(
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"http-interop/http-factory-guzzle": "^1.0"
},
"type": "magento2-module",
"version": "101.8.0",
"version": "101.8.1",
"license": [
"OSL-3.0",
"AFL-3.0"
Expand Down

0 comments on commit c6a6767

Please sign in to comment.