Some checks are pending
Module sub-split / Sub-split (push) Waiting to run
- Base: wintercms/winter branch 1.2 (full framework) - Theme vivespos: Canvas 7 + Bootstrap 5 CDN, custom CSS - Layout: deferred GTM/GA4 tracking, JSON-LD SoftwareApplication - Partials: hero (offline-first), features, modes (offline/nube toggle), screenshots, pricing (3 planes), comparison, FAQ, CTA - Plugin VivesPOS.Site with ContactForm - Dockerfile: PHP 8.2 Apache, port 80, healthcheck - Added winter/wn-pages, blog, sitemap, seo plugins - Active theme set to vivespos
64 lines
1.6 KiB
PHP
64 lines
1.6 KiB
PHP
<?php namespace System\Console;
|
|
|
|
use Winter\Storm\Console\Command;
|
|
use System\Classes\UpdateManager;
|
|
|
|
/**
|
|
* Console command to tear down the database.
|
|
*
|
|
* This destroys all database tables that are registered for Winter and all plugins.
|
|
*
|
|
* @package winter\wn-system-module
|
|
* @author Alexey Bobkov, Samuel Georges
|
|
*/
|
|
class WinterDown extends Command
|
|
{
|
|
use \Winter\Storm\Console\Traits\ConfirmsWithInput;
|
|
|
|
/**
|
|
* @var string|null The default command name for lazy loading.
|
|
*/
|
|
protected static $defaultName = 'winter:down';
|
|
|
|
/**
|
|
* @var string The name and signature of this command.
|
|
*/
|
|
protected $signature = 'winter:down
|
|
{--f|force : Force the operation to run and ignore production warnings and confirmation questionss.}';
|
|
|
|
/**
|
|
* @var string The console command description.
|
|
*/
|
|
protected $description = 'Destroys all database tables for Winter and all plugins.';
|
|
|
|
/**
|
|
* Create a new command instance.
|
|
*/
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
|
|
// Register aliases for backwards compatibility with October & Laravel
|
|
$this->setAliases(['october:down', 'migrate:reset']);
|
|
}
|
|
|
|
/**
|
|
* Execute the console command.
|
|
*/
|
|
public function handle(): int
|
|
{
|
|
if (!$this->confirmWithInput(
|
|
"This will completely delete all database tables in use with your Winter installation.",
|
|
"DELETE"
|
|
)) {
|
|
return 1;
|
|
}
|
|
|
|
UpdateManager::instance()
|
|
->setNotesOutput($this->output)
|
|
->uninstall();
|
|
|
|
return 0;
|
|
}
|
|
}
|