You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/Command/Preview/Repair.php
+25-6Lines changed: 25 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,8 @@ protected function configure() {
76
76
->setName('preview:repair')
77
77
->setDescription('distributes the existing previews into subfolders')
78
78
->addOption('batch', 'b', InputOption::VALUE_NONE, 'Batch mode - will not ask to start the migration and start it right away.')
79
-
->addOption('dry', 'd', InputOption::VALUE_NONE, 'Dry mode - will not create, move or delete any files - in combination with the verbose mode one could check the operations.');
79
+
->addOption('dry', 'd', InputOption::VALUE_NONE, 'Dry mode - will not create, move or delete any files - in combination with the verbose mode one could check the operations.')
80
+
->addOption('delete', null, InputOption::VALUE_NONE, 'Delete instead of migrating them. Usefull if too many entries to migrate.');
80
81
}
81
82
82
83
protectedfunctionexecute(InputInterface$input, OutputInterface$output): int {
@@ -94,10 +95,15 @@ protected function execute(InputInterface $input, OutputInterface $output): int
94
95
}
95
96
96
97
$dryMode = $input->getOption('dry');
98
+
$deleteMode = $input->getOption('delete');
99
+
97
100
98
101
if ($dryMode) {
99
102
$output->writeln("INFO: The migration is run in dry mode and will not modify anything.");
100
103
$output->writeln("");
104
+
} elseif ($deleteMode) {
105
+
$output->writeln("WARN: The migration will _DELETE_ old previews.");
0 commit comments