File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
app/code/Magento/Catalog/Setup/Patch/Data Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 9
9
use Magento \Catalog \Model \Product ;
10
10
use Magento \Eav \Setup \EavSetup ;
11
11
use Magento \Eav \Setup \EavSetupFactory ;
12
+ use Magento \Framework \DB \Adapter \AdapterInterface ;
12
13
use Magento \Framework \DB \Query \Generator ;
13
14
use Magento \Framework \DB \Select ;
14
15
use Magento \Framework \DB \Sql \Expression ;
15
16
use Magento \Framework \Setup \ModuleDataSetupInterface ;
16
17
use Magento \Framework \Setup \Patch \DataPatchInterface ;
18
+ use Magento \Framework \Setup \Patch \NonTransactionableInterface ;
17
19
18
- class UpdateMultiselectAttributesBackendTypes implements DataPatchInterface
20
+ class UpdateMultiselectAttributesBackendTypes implements DataPatchInterface, NonTransactionableInterface
19
21
{
20
22
private const BATCH_SIZE = 10000 ;
21
23
@@ -115,7 +117,12 @@ public function apply()
115
117
$ selectForInsert ->reset (Select::COLUMNS );
116
118
$ selectForInsert ->columns ($ columnNames );
117
119
$ connection ->query (
118
- $ connection ->insertFromSelect ($ selectForInsert , $ textTable , $ columnNames )
120
+ $ connection ->insertFromSelect (
121
+ $ selectForInsert ,
122
+ $ textTable ,
123
+ $ columnNames ,
124
+ AdapterInterface::INSERT_ON_DUPLICATE
125
+ )
119
126
);
120
127
$ selectForDelete = clone $ select ;
121
128
$ selectForDelete ->reset (Select::COLUMNS );
You can’t perform that action at this time.
0 commit comments