A vendor-agnostic database migration tool for PHP 5.3+ projects, similar to Doctrine Migrations but framework-independent.
Phpmig is a database migration tool for PHP applications that provides a flexible way to manage database schema changes across different environments. It solves the problem of version-controlling and applying database modifications without being tied to any specific framework or ORM, ensuring consistency between development, staging, and production databases.
PHP developers working on projects that require database schema versioning, particularly those using multiple database libraries (like PDO, Doctrine DBAL, Zend Framework, or Eloquent ORM) or building modular applications with separate migration sets.
Developers choose Phpmig for its framework independence and minimal dependencies, allowing integration into any PHP 5.3+ project. Its unique selling point is the ability to support multiple adapters and module-based migrations while offering rollback capabilities and customizable templates.
Simple migrations system for php
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Works with any PHP 5.3+ project and integrates with multiple database libraries like PDO, Doctrine DBAL, Zend Framework, and Eloquent ORM, avoiding vendor lock-in.
Supports separate migration sets for different application modules, enabling independent versioning and deployment of module-specific schema changes, as shown in the module migrations example.
Allows rolling back to specific versions or completely reverting all migrations with commands like 'phpmig rollback -t 0', providing precise database state management.
Enables custom migration templates using PHP or sprintf-based parsing via 'phpmig.migrations_template_path', allowing tailored migration scripts to fit project needs.
Supports organizing migration scripts across multiple directories by setting 'phpmig.migrations' as an array of paths, ideal for large or complex codebases.
Requires creating a custom bootstrap file with dependency injection (e.g., Pimple) and configuring adapters, which can be error-prone and time-consuming compared to integrated tools.
Lacks advanced features like seeders, migration dependencies, or a built-in migration manager, as noted in the project's TODO list, making it less comprehensive than alternatives like Phinx.
The README examples assume familiarity with Pimple and specific database libraries, which may pose a barrier for developers new to dependency injection or those expecting more guided setup.
Being a smaller project, it may have slower updates and limited community support, potentially leading to compatibility issues with newer PHP versions or libraries, as hinted by the inspiration from older tools.
PHPMig is an open-source alternative to the following products: