From 300ee33be27f08c3c0678a7c32fd154a9972e0e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Fri, 9 Jan 2026 19:46:09 +0100 Subject: [PATCH] Allow to continue even if source and target db platform are the same --- src/Command/Migrations/DBPlatformConvertCommand.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Command/Migrations/DBPlatformConvertCommand.php b/src/Command/Migrations/DBPlatformConvertCommand.php index 80dc332e..256a4db1 100644 --- a/src/Command/Migrations/DBPlatformConvertCommand.php +++ b/src/Command/Migrations/DBPlatformConvertCommand.php @@ -72,8 +72,11 @@ class DBPlatformConvertCommand extends Command //Check that both databases are not using the same driver if ($sourceEM->getConnection()->getDatabasePlatform()::class === $this->targetEM->getConnection()->getDatabasePlatform()::class) { - $io->error('Source and target database are using the same database platform / driver. This command is only intended to migrate between different database platforms (e.g. from MySQL to PostgreSQL).'); - return 1; + $io->warning('Source and target database are using the same database platform / driver. This command is only intended to migrate between different database platforms (e.g. from MySQL to PostgreSQL).'); + if (!$io->confirm('Do you want to continue anyway?', false)) { + $io->info('Aborting migration process.'); + return Command::SUCCESS; + } } @@ -219,6 +222,6 @@ class DBPlatformConvertCommand extends Command AND T.relname = PGT.tablename ORDER BY S.relname; SQL); - }; + } } }