From a946669dc893b5ca0b85811aa087d791e18e527c Mon Sep 17 00:00:00 2001 From: Boy132 Date: Tue, 8 Oct 2024 23:45:50 +0200 Subject: [PATCH] Add warning about database data to database settings command (#612) --- .../Commands/Environment/DatabaseSettingsCommand.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/Console/Commands/Environment/DatabaseSettingsCommand.php b/app/Console/Commands/Environment/DatabaseSettingsCommand.php index f1218e40c..570df0f2e 100644 --- a/app/Console/Commands/Environment/DatabaseSettingsCommand.php +++ b/app/Console/Commands/Environment/DatabaseSettingsCommand.php @@ -42,6 +42,13 @@ class DatabaseSettingsCommand extends Command */ public function handle(): int { + $this->error('Changing the database driver will NOT move any database data!'); + $this->error('Please make sure you made a database backup first!'); + $this->error('After changing the driver you will have to manually move the old data to the new database.'); + if (!$this->confirm('Do you want to continue?')) { + return 1; + } + $selected = config('database.default', 'sqlite'); $this->variables['DB_CONNECTION'] = $this->option('driver') ?? $this->choice( 'Database Driver',