Skip to content

Commit cc64c97

Browse files
committed
Merge branch 'magento2' of https://github.com/xcom-magento/EAVCleaner into pr/49
2 parents 4a41755 + 8f75d55 commit cc64c97

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Console/Command/RestoreUseDefaultValueCommand.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,13 @@ protected function configure()
3737
Restore product's 'Use Default Value' if the non-global value is the same as the global value
3838
")
3939
->addOption('dry-run')
40-
->addOption('entity', null, InputOption::VALUE_REQUIRED, "Set entity to cleanup (product or category)");
40+
->addOption(
41+
'entity',
42+
null,
43+
InputOption::VALUE_OPTIONAL,
44+
'Set entity to cleanup (product or category)',
45+
'product'
46+
);
4147
}
4248

4349
/**
@@ -80,7 +86,7 @@ public function execute(InputInterface $input, OutputInterface $output)
8086

8187
foreach ($tables as $table) {
8288
// Select all non-global values
83-
$fullTableName = $db->getTableName('catalog_'. $entity. '_entity_' . $table);
89+
$fullTableName = $db->getTableName('catalog_' . $entity . '_entity_' . $table);
8490
$rows = $db->fetchAll('SELECT * FROM ' . $fullTableName . ' WHERE store_id != 0');
8591

8692
foreach ($rows as $row) {

0 commit comments

Comments
 (0)