From f7571127794cb2bfebb0e04732bc48379c93900e Mon Sep 17 00:00:00 2001 From: WINBIGFOX Date: Sat, 17 May 2025 18:31:34 +0200 Subject: [PATCH] feat: add WipeDatabaseCommand for database management Introduced the WipeDatabaseCommand to streamline database wiping in the NativePHP development environment. --- src/Commands/WipeDatabaseCommand.php | 20 ++++++++++++++++++++ src/NativeServiceProvider.php | 2 ++ 2 files changed, 22 insertions(+) create mode 100644 src/Commands/WipeDatabaseCommand.php diff --git a/src/Commands/WipeDatabaseCommand.php b/src/Commands/WipeDatabaseCommand.php new file mode 100644 index 00000000..6114bd42 --- /dev/null +++ b/src/Commands/WipeDatabaseCommand.php @@ -0,0 +1,20 @@ +laravel))->rewriteDatabase(); + + return parent::handle(); + } +} diff --git a/src/NativeServiceProvider.php b/src/NativeServiceProvider.php index 74dfba3c..46e7dcb0 100644 --- a/src/NativeServiceProvider.php +++ b/src/NativeServiceProvider.php @@ -15,6 +15,7 @@ use Native\Laravel\Commands\LoadStartupConfigurationCommand; use Native\Laravel\Commands\MigrateCommand; use Native\Laravel\Commands\SeedDatabaseCommand; +use Native\Laravel\Commands\WipeDatabaseCommand; use Native\Laravel\Contracts\ChildProcess as ChildProcessContract; use Native\Laravel\Contracts\GlobalShortcut as GlobalShortcutContract; use Native\Laravel\Contracts\PowerMonitor as PowerMonitorContract; @@ -42,6 +43,7 @@ public function configurePackage(Package $package): void FreshCommand::class, MigrateCommand::class, SeedDatabaseCommand::class, + WipeDatabaseCommand::class, ]) ->hasConfigFile() ->hasRoute('api')