From 87a68664c3901b60b1896c7e2cf3d44b07f1990f Mon Sep 17 00:00:00 2001 From: Mischa Braam Date: Tue, 14 May 2024 09:13:44 +0200 Subject: [PATCH] Add db uninstall command --- cli/valet.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/cli/valet.php b/cli/valet.php index 8088131f..423819e6 100755 --- a/cli/valet.php +++ b/cli/valet.php @@ -569,9 +569,22 @@ return; } + if ($run === 'uninstall') { + if (!$defaults['yes']) { + $question = new ConfirmationQuestion('Are you sure you want to remove mysql? [y/N] ', false); + if (!$helper->ask($input, $output, $question)) { + return; + } + } + + Mysql::uninstall(); + + return; + } + throw new RuntimeException('Command not found'); }) - ->descriptions('Database commands (list/ls, create, drop, reset, import, reimport, export/dump, pwd/password)'); + ->descriptions('Database commands (list/ls, create, drop, reset, import, reimport, export/dump, pwd/password, uninstall)'); /** * Elasticsearch/opensearch services.