Support for Automated Database Migrations Using Doctrine Migrations Integration

I would like to request a feature that integrates automated database migrations into PHPMaker using the existing Doctrine ORM and Doctrine DBAL components already bundled with PHPMaker. This feature would:

  • Allow PHPMaker projects to manage schema changes using versioned migration files stored in a dedicated migrations folder.
  • Automatically detect the current database schema version on connection.
  • Apply new migrations sequentially if the database is outdated, creating or upgrading tables as needed.
  • Enable easy generation of migration files based on entity changes, leveraging Doctrine Migrations CLI tools.
  • Provide an optional hook in the PHPMaker lifecycle (e.g., Database Connecting event) to run migrations automatically on application start.
  • Support rollback capabilities for safer deployment.
  • Improve database schema version control and reduce manual SQL script management for schema updates.

This feature would help maintain database consistency in multi-environment and team projects.