M2M8P0.php 851 B

12345678910111213141516171819202122232425262728293031
  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\App\Models\ProductConfiguration;
  6. use ModulesGarden\ProxmoxAddon\App\Models\Whmcs\Product;
  7. use ModulesGarden\ProxmoxAddon\Core\Helper;
  8. /**
  9. * Description of M2M6P0
  10. *
  11. */
  12. class M2M8P0 extends DefaultPatch
  13. {
  14. public function execute()
  15. {
  16. if ($this->runSchema())
  17. {
  18. Helper\sl('logger')
  19. ->addDebug("Correctly installed update {$this->getVersion()} .", []);
  20. }
  21. else
  22. {
  23. Helper\sl('errorManager')
  24. ->addError(self::class, "Incorrectly installed update {$this->getVersion()} .", []);
  25. }
  26. $this->up();
  27. }
  28. }