Are there any recommended migration tools that are framework-independent and support PostgreSQL in PHP development?

When working on PHP development projects that involve PostgreSQL databases, using migration tools can help manage database schema changes efficiently. One recommended migration tool that is framework-independent and supports PostgreSQL is Phinx. Phinx allows developers to create and execute database migrations using PHP code, making it easy to version control and apply changes to the database schema.

// Example of using Phinx migration tool in PHP development with PostgreSQL

require 'vendor/autoload.php';

use Phinx\Console\PhinxApplication;
use Symfony\Component\Console\Input\StringInput;
use Symfony\Component\Console\Output\NullOutput;

// Initialize Phinx
$app = new PhinxApplication();
$input = new StringInput(' ');
$input->setInteractive(false);
$app->setAutoExit(false);

// Run migrations
$status = $app->doRun($input, new NullOutput());