1
0

InitBackgroundImagesMigration.php 733 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCA\Theming\Migration;
  8. use OCA\Theming\Jobs\MigrateBackgroundImages;
  9. use OCP\BackgroundJob\IJobList;
  10. use OCP\Migration\IOutput;
  11. use OCP\Migration\IRepairStep;
  12. class InitBackgroundImagesMigration implements IRepairStep {
  13. public function __construct(
  14. private IJobList $jobList,
  15. ) {
  16. }
  17. public function getName() {
  18. return 'Initialize migration of background images from dashboard to theming app';
  19. }
  20. public function run(IOutput $output) {
  21. $this->jobList->add(MigrateBackgroundImages::class, ['stage' => MigrateBackgroundImages::STAGE_PREPARE]);
  22. }
  23. }