M3M1P1.php 1.1 KB

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