M2M7P3.php 770 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace ModulesGarden\ProxmoxAddon\App\Configuration\Addon\Update\Patch;
  3. use Illuminate\Database\Capsule\Manager as DB;
  4. use ModulesGarden\ProxmoxAddon\App\Configuration\Addon\Update\DefaultPatch;
  5. use ModulesGarden\ProxmoxAddon\Core\Helper;
  6. /**
  7. * Description of M2M6P0
  8. *
  9. * @author <slawomir@modulesgarden.com>
  10. */
  11. class M2M7P3 extends DefaultPatch
  12. {
  13. public function execute()
  14. {
  15. if ($this->runSchema())
  16. {
  17. Helper\sl('logger')
  18. ->addDebug("Correctly installed update {$this->getVersion()} .", []);
  19. }
  20. else
  21. {
  22. Helper\sl('errorManager')
  23. ->addError(self::class, "Incorrectly installed update {$this->getVersion()} .", []);
  24. }
  25. $this->up();
  26. }
  27. }